#find . -name '*.rpm' -exec ls -l {} \;
-rw-r--r-- 1 root root 771236 12月 12 2015 ./123/lftp-4.0.9-1.el6.x86_64.rpm
-rw-rw-r-- 1 root root 771236 12月 12 2015 ./lftp-4.0.9-1.el6.x86_64.rpm
-rw-rw-r-- 1 root root 154392 12月 12 2015 ./vsftpd-2.2.2-11.el6.x86_64.rpm

# find . -name '*.rpm' -exec touch {} \;

find . -name '*.rpm' -exec ls -l {} \;
-rw-r--r-- 1 root root 771236 7月  20 16:28 ./123/lftp-4.0.9-1.el6.x86_64.rpm
-rw-rw-r-- 1 root root 771236 7月  20 16:28 ./lftp-4.0.9-1.el6.x86_64.rpm
-rw-rw-r-- 1 root root 154392 7月  20 16:28 ./vsftpd-2.2.2-11.el6.x86_64.rpm

 

问题:找出目录下的所有软连接并删除

find . -type -l -exec rm {} \;

find . -maxdepth 1 -type l -exec ls -l {} \;

 

posted on 2016-07-20 16:40  浮沉一梦  阅读(385)  评论(0编辑  收藏  举报