linner.org

Fix (the annoying) “argument list too long”

Posted by in Lagom

In this example we want to archive a huge number of .xml files in the current directory:

# find . -name "*.xml" -print > ./file.lst
# tar czvf ./archive.tgz --files-from ./file.lst

And delete all archived files:

# xargs -a ./file.lst rm -v
# rm ./file.lst
0