日期:2014-05-16  浏览次数:20627 次

求ac命令源代码
rt,楼主现正在看linux/unix编程实践教程,其中有一题是编写ac命令。(ac命令是用来查看用户登录时间信息的)自已写完后不对,现急求ac命令源码,求助度娘,g神不到,故发贴求助。请大家帮帮忙,给个链接或贴出来。谢谢。

------解决方案--------------------
下载: http://ftp.gnu.org/gnu/acct/

主页: http://www.gnu.org/software/acct/

man ac 
AUTHOR
       The  GNU accounting utilities were written by Noel Cragg <noel@gnu.ai.mit.edu>. The man page
       was adapted from the accounting texinfo page by Susan Kleinmann <sgk@sgk.tiac.net>.

------解决方案--------------------
# rpm -qf $(which ac)
psacct-6.3.2-44.el5

# rpm -qi psacct
Name        : psacct                       Relocations: (not relocatable)
Version     : 6.3.2                             Vendor: CentOS
Release     : 44.el5                        Build Date: Thu 12 Mar 2009 04:04:40 AM CST
Install Date: Tue 15 Mar 2011 09:46:16 PM CST      Build Host: chamkaur.karan.org
Group       : Applications/System           Source RPM: psacct-6.3.2-44.el5.src.rpm
Size        : 109596                           License: GPL
Signature   : DSA/SHA1, Tue 17 Mar 2009 07:38:11 PM CST, Key ID a8a447dce8562897
Packager    : Karanbir Singh <kbsingh@karan.org>
Summary     : Utilities for monitoring process activities.
Description :
The psacct package contains several utilities for monitoring process
activities, including ac, lastcomm, accton and sa. The ac command
displays statistics about how long users have been logged on. The
lastcomm command displays information about previous executed
commands. The accton command turns process accounting on or off. The
sa command summarizes information about previously executed
commands.