/bin/rm: Argument list too long

You type: rm * -f
You get: /bin/rm: Argument list too long
Reason: in shell when you do * after rm and get Argument list too long, your shell actually expands that * and puts all the filenames after rm and since length of the command line is limited, you end up getting argument list too long.

Possible solutions:

  1. You can remove the whole directory and recreate the directory
  2. When 1 is not an option, you can you “find” to delete for you. I actually use this method more often then removing/creating directory.
    find . -exec rm {} \; This will delete everything in current directory on. Be careful with this command since you could potentially delete things you may not wanted to. I suggest running find . |more first to see what will be affected.  To read more about find see:  man find

————————————-
DISCLAIMER: Please be smart and use code found on internet carefully. Make backups often. And yeah.. last but not least.. I am not responsible for any damage caused by this posting. Use at your own risk.

5 thoughts on “/bin/rm: Argument list too long

  1. Pingback: Consejos para utilizar el comando rm de Linux con múltiples parámetros | Mareos de un Geek

  2. Kulkava

    Pokrasnenie armpit delivers discomfort, hurts when clicking. to Carry visit doctors should not. Bulge under the muscle cavity may turn out to be dangerous disease. However often it is consequence frequent use deodorants, violation rules personal hygiene, strong sweating. Inflammation causes narrow clothing, alien razor-affiliation, the infection.
    painless lump in armpit
    Discomfort under the arm, inflammation, lump getting warm? This is the ulcer that will should, then take antibiotics. first stage treat solutions, anti-inflammatory drugs. When the ailment switched to second stage, shown surgical procedure.

  3. pandora jewelry

    I as well as my friends appeared to be examining the good tricks found on the blog and then instantly I got a horrible suspicion I had not thanked you for those strategies. All of the young boys became certainly joyful to see all of them and have extremely been taking pleasure in these things. I appreciate you for genuinely so thoughtful as well as for making a decision on such essential ideas most people are really wanting to learn about. Our sincere regret for not saying thanks to you earlier.

  4. kobe sneakers

    I just wanted to jot down a simple word in order to thank you for these superb instructions you are showing on this site. My time-consuming internet search has at the end of the day been honored with professional know-how to exchange with my friends. I ‘d assert that we site visitors are really endowed to dwell in a superb place with very many perfect individuals with good guidelines. I feel very lucky to have used the web page and look forward to plenty of more exciting times reading here. Thanks again for everything.

Leave a Reply

Your email address will not be published. Required fields are marked *