SHELL编程四剑客工具(Find、grep、sed、awk):提高脚本的功能,完善脚本,让脚本更加高大上!编程
find path -option [ -print ] [ -exec -ok command ] { } \;vim
find . -name "*.log" -type f -size +100M -perm 644 ! -name "test1.log"编辑器
atime:access time,文件被访问的时间;工具
ctime:change time,文件属性被修改时间;操作系统
mtime:modify time,文件内容修改时间;3d
find . -name "*.log" -type f -size +100M -perm 644 ! -name "test1.log" -mtime -30 -mmin -1blog
grep -[acinv] 'word' Filenameci
SHELL编程四剑客工具(Find、grep、sed、awk):提高脚本的功能,完善脚本,让脚本更加高大上!io
find path -option [ -print ] [ -exec -ok command ] { } \;test
find . -name "*.log" -type f -size +100M -perm 644 ! -name "test1.log"
atime:access time,文件被访问的时间;
ctime:change time,文件属性被修改时间;
mtime:modify time,文件内容修改时间;
find . -name "*.log" -type f -size +100M -perm 644 ! -name "test1.log" -mtime -30 -mmin -1
grep -[acinv] 'word' Filename