Linux Command Tips

时间:2015-05-14 00:42:04   收藏:0   阅读:185

1.delete all executable files under certain directory

find /directory -type f -executable -delete

or

find /directory  -type f -executable -exec rm -f {} \;

Above command will delete the executable files in sub-directory.

To specifically delete all executable files in your home directory (not in sub-directories) and ask you whether you want to delete each file you can do something like

find ~ -type f -executable -maxdepth 0 -exec rm -i {} \;

 

原文:http://www.cnblogs.com/bukekangli/p/4502083.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!