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... - How To List A Custom Post Type’s Taxonomies And Terms
Jennifer M. Dodd has published a brilliant article on listing post taxonomies / terms /... - Installing memcached on CentOS (cPanel)
Welcome to hell. No really, compared to installing memcached on Ubuntu, CentOSs really sucks. CentOS... - [Snippet] Create a large file in Linux
Need to create a large file? For disk speed tests? Or space tests? This will... - Ridiculously simple NTLM Authentication for Apache (Ubuntu)
We all know Ubuntu makes things amazingly simple. This is the best I've found so...



