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

Mobile
feeds
Welcome Login | Register

-bash: /bin/rm: argument list too long
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » Linux Forums
        » » -bash: /bin/rm: argument list too long
-bash: /bin/rm: argument list too long
Post Description: bash bin rm argument list too long Linux
Post Tags:
This Post Has Been Viewed 27 Times Since Sun Dec 28, 2008 7:09 pm Author carl with 5 replies
Next Post »» how to assign permission to the user in linux
-bash: /bin/rm: argument list too long
Advertise On This Page




hi, why am i getting this error when i try to remove some old files i dont need anymore?

this is my command:

rm -f /home/var/www/web/oldfiles/dynami*


please help me.


Leave Your Comments

Your Name
Your Email Address (Will Not Be Published)
Notify Me When Someone Replies to this Page
(An email will be sent to you when someone replies to your comments)
Your Comments
Include A Picture with your comments
Share
| More
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
BBCODE:
Subscribe Feeds
Webmasters - Exchange Links With Us. Add related websites to this topic
Add Link:
Links Related to : -bash: /bin/rm: argument list too long

Comments and replies About -bash: /bin/rm: argument list too long
:: 1 :: Reply #87875 Reply By wallpaperama On Sun Dec 28, 2008 7:10 pm
wallpaperama:
you need to cd to /home/var/www/web/oldfiles/

send the command again like this:

rm -f dynami*

try it
:: 2 :: Reply #88129 Reply By carl On Tue Dec 30, 2008 6:07 pm
carl:
i still am getting:
-bash: /bin/rm: argument list too long

when i send this command
:: 3 :: Reply #88130 Reply By wallpaperama On Tue Dec 30, 2008 6:09 pm
wallpaperama:
i think rm has a limit, so you will have to do a work-around

you can do is use find and pipe it so each file found, remove once by one.

like this:

commmand:

change to the directory where all your files are located:
cd /home/var/www/web/oldfiles/


now find and remove each file with the wild card
find . -name 'wallpapers_*' | xargs rm


hope that helps



:: 4 :: Reply #88131 Reply By carl On Tue Dec 30, 2008 6:11 pm
carl:
oh wow, that worked, thanks so much, ive been trying to get this fix. i started to delete one by one, but there were like 2000 files in there. you saved me so much time

:)
:: 5 :: Reply #91167 Reply By Prakash On Fri Jan 23, 2009 5:47 am
Prakash:
23-6926-prakash.jpg
dear
i also got this error while deleting certain files.
to overcome this just use the command like this

echo /home/var/www/web/oldfiles/dynami* | xargs /bin/rm -f

enjoy!!!!!!!!!!!!!!!!!!!!