Archive for February, 2008

tar – argument list too long

February 12, 2008

If you have a lot of files in one directory and you try to process them, for example, to tar them, you will very likely get this error:

$ tar cvzf allhtml.tgz *.html
-bash: /bin/tar: Argument list too long

Try this:

$ find . -name ‘*.html’ -print > ./allfiles
$ tar -cf allhtml.tgz –files-from ./allfiles