2011年5月20日

Linux下 使用C语言编写who命令

摘要: Linux下 使用C语言编写who命令 阅读全文

posted @ 2011-05-20 15:44 Hi小新 阅读(2921) 评论(0) 推荐(0) 编辑

who、whoami命令 和 who am i 命令的区别

摘要: 先看看普通用户和root用户输入这三条命令的不同结果:看出区别来了吧,whoami显示的是当前“操作用户”的用户名,而who am i显示的是“登录用户”的用户名。用Linux的术语来解释就是:(实际用户=uid,即user id。有效用户=euid,即effective user id)who am i 显示的是实际用户的用户名,即用户登陆的时候的用户ID。此命令相当于who -m。whoami 显示的是有效用户ID(操作用户). 阅读全文

posted @ 2011-05-20 15:43 Hi小新 阅读(15084) 评论(0) 推荐(0) 编辑

fgetc和getc的区别

摘要: The function getchar is defined to be equivalent to getc(stdin). The difference between the first two functions is that getc can be implemented as a macro, whereas fgetc cannot be implemented as a macro. This means three things.1.The argument to getc should not be an expression with side effects.2.S 阅读全文

posted @ 2011-05-20 15:41 Hi小新 阅读(10181) 评论(0) 推荐(5) 编辑

浮点数计算溢出处理问题、浮点数1.#INF和1.#IND 问题

摘要: 浮点数计算溢出处理问题、浮点数1.#INF和1.#IND 问题 阅读全文

posted @ 2011-05-20 15:31 Hi小新 阅读(13360) 评论(0) 推荐(0) 编辑

导航