Nov 15, 2006 #1 Naoise Programmer Dec 23, 2004 318 IE I want to delete all *.bak files from a dir/subdirs. Bash shell. Something along the lines of rm -rf *.bak <mydir> I realise this will not work, just used it to illustrate. Any ideas?
I want to delete all *.bak files from a dir/subdirs. Bash shell. Something along the lines of rm -rf *.bak <mydir> I realise this will not work, just used it to illustrate. Any ideas?
Nov 15, 2006 #2 Ogzilal MIS Oct 9, 2003 280 FR Hi, man find Code: find /some/path -type f -name "*.bak" -exec rm {} \; Upvote 0 Downvote
Nov 15, 2006 #3 PHV MIS Nov 8, 2002 53,708 FR Another (faster) way: find /path/to/dir -type f -name '*.bak' | xargs rm -f Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
Another (faster) way: find /path/to/dir -type f -name '*.bak' | xargs rm -f Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886