/bin/rm: Argument list too long

If you have too many files to remove, try this trick:

find . -name '*' | xargs rm -v

Printed from: http://rackerhacker.com/2007/03/26/binrm-argument-list-too-long/ .
© Major Hayden 2012.

2 Comments   »

  • Suneelm says:

    Hey thanx man !!!!! it solved my problem .. i was trying to delete some ~1 lacs files of 6.2 TB storage space .. this command worked for me ..

  • из консоли ls -l /usr/local/vpopmail/domains/oldcomp.ru/abuse/Maildir/cur/ | awk '{print "rm /usr/local/vpopmail/domains/oldcomp.ru/abuse/Maildir/cur/"$9}' | /bin/sh

    удаляет все !!!

RSS feed for comments on this post

Leave a Reply

 

  • Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you find the information useful. If you spot something that's incorrect or confusing, please write a comment and let me know. Drop me a line if there's something you want to know more about and I'll do my best to write a post on the topic.
    -- Major Hayden

    Flattr this