bash – Argument List Too Long
Posted on July 29, 2007
I've got several scripts that have been failing recently due to the high number of files in a directory.
Say for example, my site wide spamassassin Bayes learning script that runs nightly, it has started failing sometimes when a lot of spam has been caught by users.
I'd see
bash: /bin/rm: Argument list too long
A fix would look like this
for i in /your/directory
do
rm -rvf $i
done
find would probably also do the same job.
Related posts:
- Ubuntu sources.list Generatror
I had a problem with some slow Ubuntu sources today, instead of changing the whole... - Using rsync to maintain backups on Linux
Following on from my previous article, regarding Setting up and using NFS on Ubuntu, here's... - SpamAssassin site wide spam learning
SpamAssassin is great. I wouldn't run a mail server without it. Obviously it isn't 100%... - mod_geoip Revisted including stopping spam in phpBB 2
I've recently moved a client's forum onto a new cPanel server, previously it was on... - Preventing MSN Messenger Spam in Pidgin
I use Pidgin as my instant messenger application. Mainly because it allows me to chat...