易截截图软件、单文件、免安装、纯绿色、仅160KB

获取linux所有用户信息

#include <iostream>
#include <pwd.h>
#include <sys/types.h>
#include <stddef.h>
#include <string>
#include <list>
using namespace std;
void GetUser(list<string>& lsUser);
int main()
{
list<string> lsUser;
GetUser(lsUser);
cout << "all user name in current computer:" << endl;
list<string>::iterator it;
for (it = lsUser.begin(); it != lsUser.end(); it++)
{
cout << it->c_str()<< endl;
}
return 0;
}
void GetUser(list<string>& lsUser)
{
struct passwd* pstPwd = NULL;
setpwent();
while ( (pstPwd = getpwent()) != NULL )
{
lsUser.push_front(pstPwd->pw_name);
}
endpwent();
}
 


相关文档:

Linux设备模型之input子系统详解

一:前言
最近在研究android的sensor driver,主要是E-compass,其中用到了Linux input子系统.在网上也看了很多这方面的资料,感觉还是这篇分析的比较细致透彻,因此转载一下以便自己学习,同时和大家分享!
(这篇博客主要是以键盘驱动为例的,不过讲解的是Linux Input Subsystem,可以仔细的研究一下!)
键盘驱动将检 ......

Linux下Red5安装配置

 首先需要安装Red5运行所需的java开发环境jdk,我所有的文件都保存到/root/download,安装要用root
  用户进行安装
  下载地址为https://sdlc6e.sun.com/ECom/EComActionServlet;jsessionid= 8CEC5D9DFF18A14B277B3C32456062B1我下载的是类型Linux RPM in self-extracting file 的文件,文件名为
  jdk-1_5_0_0 ......

如何选择最适合的Linux版本

 作者:51cto
http://www.ccw.com.cn 2009-02-27 11:06:03
当你对别人说,“我要买辆车。”他马上就会问你:“什么车?”福特、丰田、还是本田?是双门跑车、小轿车、还是面包车?当然,还有其他类似的问题。
同样,如果你说“我想安装Linux!”你会被问到同样的问题:哪个Linu ......

Linux下无法mount本机IP的解决方法:

设置dsn后虽然虚拟机可以上网了,但是用户名变成了bogon,而不是之前的localhost,去掉DNS后重启虚拟机就又变成了localhost
然后就可以mount本机了
还有一种方法:
hostname 显示当前主机名
hostname localhost 设置当前主机名为localhost
估计也可以解决上述不能mount的问题。 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号