UNIX teminal 常用命令记录

命令格式: find dir -name filename command 
例子: 
find . -name hello -print 寻找目前目录及所有的子目录内叫 
hello的文档. 
find . -ctime +7 -print 找出七天内未被更动的文档 
find . -size +2000m -print 找出大小超过2000 bytes的文档 
find /tmp -user b1234567 -print 在/tmp下属於b1234567的文档 
find . -name '*.c' -exec rm {} \;[注释1]  删除所有的.c档 
find . -name test\* -print 显示当前目录及其子目录文件名前4 
位为test的文件名 


 [注释1]

注意此处的\;不能少

若没有\;,则会出现find: incomplete statement错误提示。

你可能感兴趣的:(UNIX teminal 常用命令记录)