×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Massimo Zappino
Added: Dec 20, 2011 11:04 AM
Views: 77
When you try to delete a long list of file you can get an "Argument list too long" message error
  1. # you can see the list of file you want to delete
  2. find . -name "*.jpg" | less
  3.  
  4. # now replace less with xargs /bin/rm
  5. find . -name "*.jpg" | xargs /bin/rm
  6.