有关unix中的LOG文件知识总结(三)
>首页 -> 社会专题 -> 硬件网络 2010-07-08 来源: 作者: 【】 浏览:1469

-rw-r--r--  1  root  staff  10027 1997 1月 9 wipe.c  

#./wipe  

USAGE: wipe [ uwla ] ...options...  

UTMP editing: Erase all usernames : wipe u [username]  

Erase one username on tty: wipe u [username] [tty]  

WTMP editing: Erase last entry for user : wipe w [username]  

Erase last entry on tty : wipe w [username] [tty] LASTLOG  

editing: Blank lastlog for user : wipe l [username] Alter lastlog  

entry : wipe l [username] [tty] [time] [host]  

Where [time] is in the format [YYMMddhhmm]  

ACCT editing: Erase acct entries on tty : wipe a [username] [tty]  

大家能看到编译好的wipe的使用方法.  

其中 u 选项为 utmp utmpx 日志擦除..  

w 选项为 wtmp wtmpx 日志擦除.  

l 选项为 lastlog 日志擦除.  

a 为/var/adm/pacct日志擦除.(一般不用这个.:)  

其中[tty]为终端号.为在有多个相同帐号同时登陆时,清除日志的使用选项.当然是要你的终端号哦.:)  

大家能用 w 命令查终端号.  

比如:  

# w  

下午 9:15 1 user, 平均负荷: 0.00, 0.00, 0.01  

用户名 终端号 登入时间 闲置 JCPU PCPU 执行命令  

root pts/1 下午 7:40 

3  w  

下面的是我在sunos 5.7上的具体的使用情况 

# w  

下午 9:15 1 user, 平均负荷: 0.00, 0.00, 0.01  

用户名 终端号 登入时间 闲置 JCPU PCPU 执行命令  

rootpts/1 下午 7:40  3  w   

# ./wipe u root  

Patching /var/adm/utmp .... Done.  

Patching /var/adm/utmpx .... Done.  

# w  

下午 9:15 1 user, 平均负荷: 0.00, 0.00, 0.01  

用户名 终端号 登入时间 闲置 JCPU PCPU 执行命令  

# ./wipe w gao  

Patching /var/adm/wtmp .... Done.  

Patching /var/adm/wtmpx .... Done.  

# ./wipe l root  

Patching /var/adm/lastlog .... Done.  

好了.  

lastlog utmp utmpx wtmp wtmpx 擦完了.  

当然我们不要忘了shell 记录.  

# ls -al /.*history  

-rw------- 1 root other 456 2月 4 20:27 .sh_history  

# rm -f .*history  

# cd  

# pwd  

/home/gao  

# ls -al /.*history  

-rw------- 1 root other 456 2月 4 20:27 .sh_history  

# rm -f .*history  

ok, 算是大功告成吧

您看到此篇文章时的感受是:
Tags: 责任编辑:佚名
免责申明: 除原创及很少部分因网文图片遗失而补存外,本站不存储任何有版权的内容。你看到的文章和信息及网址索引均由机器采集自互联网,由于时间不同,内容可能完全不同,请勿拿本网内容及网址索引用于交易及作为事实依据,仅限参考,不会自行判断者请勿接受本站信息,本网转载,并不意味着赞同其观点或证实其内容的真实性.如涉及版权等问题,请立即联系管理员,我们会予以更改或删除,保证您的权利.对使用本网站信息和服务所引起的后果,本网站不作任何承诺.
首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论:0条】 【关闭】 【返回顶部
更多
上一篇覆盖Centos服务器,安装Windows s.. 下一篇实用的网络检测net命令总结
密码: (新用户注册)

最新文章

图片主题

热门文章

推荐文章

相关文章

便民服务

手机扫描

空间赞助

快速互动

论坛互动
讨论留言

有事联系

有哪个那个什么的,赶紧点这里给DOVE发消息

统计联系

MAIL:gnlt@Dovechina.com
正在线上:1360

版权与建议

任何你想说的