kieranbarnes Independent PHP, WordPress & CubeCart Programmer

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

  1. Ubuntu sources.list Generatror
    I had a problem with some slow Ubuntu sources today, instead of changing the whole...
  2. How To List A Custom Post Type’s Taxonomies And Terms
    Jennifer M. Dodd has published a brilliant article on listing post taxonomies / terms /...
  3. Installing memcached on CentOS (cPanel)
    Welcome to hell. No really, compared to installing memcached on Ubuntu, CentOSs really sucks. CentOS...
  4. [Snippet] Create a large file in Linux
    Need to create a large file? For disk speed tests? Or space tests? This will...
  5. Ridiculously simple NTLM Authentication for Apache (Ubuntu)
    We all know Ubuntu makes things amazingly simple. This is the best I've found so...

Posted by Kieran


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

No comments yet.


Leave a comment

(required)

No trackbacks yet.