unable to remove files using rm command /bin/rm: Argument list too long

I had faced issues in deleting files using rm command which caused our linux BOX struggle to work with Mysql Databases.
I came to see an nice article from simplehelp.net and thought of sharing the same. which will help to take your headache.
on my case, i had issue on deleting this mail queue which was frozen for a month
# /var/spool/clientmqueue

Ever seen this error in Linux when you have too many files in a directory and you are unable to delete them with a simple rm -rf *? I have run into this problem a number of times. After doing a bit of research online I came across a neat solution to work around this issue.

In the above instance the command will forcefully delete all files in the current directory that begin with SAS. You can replace the SAS-* with anything you like. You can also replace it with just a * if you want to remove all files in the folder.

Thanks who ever wrote this.

About ilangovan ramasamy

I am a IT manager on a Corporate co. Started My Career In a Internet Center. having 10 years on Experience on IT. Very much Interested in knowing New technologies & gadgets. Wrote many Articles & how to’s for Computer Related issues. As I am in to hosting industry We face many issues on work. I thought of sharing my knowledge with you and writing so. If you guys feel something is interesting & helpful, Please do comment on it.

View all posts by ilangovan ramasamy →


This site uses Akismet to reduce spam. Learn how your comment data is processed.