find

  find . -type f -mtime -1 -print ------------查找当前目录下建立不到一天的文件(包括子目录的)

 

 find . -type f -mtime -1 -print |xargs chmod u+w ----------并将其权限改为u+w

 

find . -type f -mtime -1 |xargs ls -al------------并将其详细情况列出

 

find + rename +mv----------------------批量将文件名myfile.bak改成myfile_240_320.bak

  594  rename 's//.bak$//' *.bak
  595  ls
  596  find . -type f -exec mv {} "{}_240_320.bak" /;

 

 rename 's/test_normal/test_stress/' *.*------批量将当前目录下的所有文件的开头test_normal改成test_stress

 

find . -name "*.txt" -type f -size 0c | xargs -n 1 rm -f  ------------查找后缀为txt的空文件,并删除

 

find . -type f -print |xargs file
./trace.txt:                                                      Non-ISO extended-ASCII text, with CRLF line terminators
./report1.txt:                                                         ASCII text, with CRLF line terminators

./paste.txt:                       ASCII English text, with CRLF line terminators

 

find -size 0 -name "*.new" -exec rm {} /;---------------------------------找出以.new为后缀的空文件,并将其删除

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值