码迷,mamicode.com
首页 > 系统相关 > 详细

Linux Command Tips

时间:2015-05-14 00:43:25      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:

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 {} \;

 

Linux Command Tips

标签:

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!