首页 > 其他 > 详细

tree、find、tail命令重要实战

时间:2016-07-11 14:05:33      阅读:304      评论:0      收藏:0      [点我收藏+]

tree -L 1 -d

ln -s ext msn  创建软连接

ls -lF| sed -n‘/^d/p’

ls -lF|awk ‘/^d’

ls -lrt  按时间倒着排

vi /etc/profile 加 alias grep=’grep --color=auto’

. /etc/profile 改颜色

Find /oldboy/test/ -type f -name “access*.log” -mtime -7   最近7天

Find /oldboy/test/ -type f -name “access*.log” -mtime +7  7天以前

Find /oldboy/test/ -type f -name “access*.log” -mtime +7|xarg rm -f

Find /oldboy/test/ -type f -name “access*.log” -mtime +7 -exec rm -f {} \;

          -mtime 修改时间

          -ctime change过的文档

          -atime access过的文档

 

tail -f /var/log/messages  跟踪文件结尾变化

tail  /var/log/messages

tail -F /var/log/messages

tree、find、tail命令重要实战

原文:http://www.cnblogs.com/bossbo/p/5659930.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!