[nycbug-talk] Deleting Lots of Files.
lamolist at cyberxdesigns.com
Wed Jun 21 17:02:32 EDT 2006
Thanks for the guidance. xargs is working nicely.
N.J. Thomas wrote:
> * Hans Kaspersetz <lamolist at cyberxdesigns.com> [2006-06-21 10:44:01 -0400]:
>> I was wondering what the best way to delete lots of files is.
>> I would like to delete all the files in the 114* series. However, when
>> I pass rm -f ./114*, I get to many arguments as an error. What I really
>> want to delete is all files from before June.
> See find(1), xargs(1).
> You can use the -name "114*" arg for find to get all the 114* files or
> the "-mtime -16" to get the files before June (but also see the -newer
> Then just use something like "xargs -n 50 echo rm" (run with echo first
> to see what is to be deleted).
> I strongly suggest you learn find and xargs thoroughly, they are very
> useful tools.
More information about the talk