LINUX xargs第二部分!!!学习经验分享。

握着玫瑰的屠夫>>>>>>>

如果你想看命令行详细分析你可以到我博客找回前面实例分析,非常详细。

find /etc/ -name '*' -type f -print0 |xargs -0 grep "omc"

 

 

find /root/images_to/ -perm 644 -print0 |xargs -0 -i chmod 777 {}

  

 

chkconfig |awk '{print $1}' |grep -Ev "sshd|network|crond|sysstat|rsyslog" |xargs -I{} chekconfig {} off

  

 

find /root/test_to/ -name "*.txt" -cmin +3 -type f |xargs rm -rf
find /root/test_to/ -name "*.txt" -ctime +5 -type f |xargs rm -rf

  

原文地址:https://www.cnblogs.com/eternalnight/p/13875527.html