How to delete files in a directory with too many files on Linux (-bash: /bin/rm: Argument list too long)

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

If you try to delete all files in a directory with too many files, you will get this error:

-bash: /bin/rm: Argument list too long

Now you should delete the directory and recreate it.

rm -rf wp-content/cache
mkdir wp-content/cache
chmod 777 wp-content/cache
chown apache:apache wp-content/cache

Technorati :

Popularity: 1%

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word