Thursday 27 March 2008

Argument list too long

If there are many files and your ls, rm or mv commands not working you can use one of these

find /path/to -name 'yourfiles*' | xargs rm
find /path/to -name 'yourfiles*' | xargs -i mv {} anildel/
find /path/to -name 'yourfiles*' -exec rm '{}' \;
find /path/to -name 'yourfiles*' -exec rm '{}' +

No comments: