I’m cleaning up my linux web server (the very one that powers this site), and I needed to delete some things that had been accumulation (spam mails). When say mean some, i mean over 100,000 files! I’m not a Linux whiz, but I can manage pretty well.
I tried to remove the files using “rm *”, only to get back “/bin/rm: Argument list too long”
my initial reaction was: wft? Arguments to long?! gtfo!
It took a bit to figure out, but I came up with a solution:
if you try:
rm *
and you get this:
/bin/rm: Argument list too long
do this instead:
find . -name "*" -print | xargs rm
The files are gone, and I am happy once again.