kieranbarnes do you know where your towel is?

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.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Related posts:

  1. Ubuntu sources.list Generatror
    I had a problem with some slow Ubuntu sources today, instead of changing the whole...
  2. Using rsync to maintain backups on Linux
    Following on from my previous article, regarding Setting up and using NFS on Ubuntu, here's...
  3. SpamAssassin site wide spam learning
    SpamAssassin is great. I wouldn't run a mail server without it. Obviously it isn't 100%...
  4. 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...
  5. Preventing MSN Messenger Spam in Pidgin
    I use Pidgin as my instant messenger application. Mainly because it allows me to chat...

What this article useful to you?



Let me know, buy me a beer!
Alternatively, if you're feeling impecunious, you may like to subscribe to my RSS feed, or see other articles in the Geeky, Linux category.

Filed under: Geeky, Linux Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.