linux - How to write a unix command or script to remove files of the same type in all sub-folders under current directory? -
linux - How to write a unix command or script to remove files of the same type in all sub-folders under current directory? -
is there way remove temp files , executables under 1 folder , sub-folders?
all can think of is:
$rm -rf *.~ but removes temp files under current directory, not remove other temp files under sub-folders @ all, also, doesn't remove executables.
i know there similar questions answered, one: find specific file type folder , sub folder java code, need unix command or short script this.
any help please? lot!
perl command line; should delete if file ends ~ or executable,
perl -mfile::find -e 'find(sub{ unlink if -f , (/~\z/ or (stat)[2] & 0111) }, ".")' linux bash perl unix
Comments
Post a Comment