I have a folder with 200k pdf files and want to tar them. Which of the following solutions would be better? I suspect the command substitution might run into problems with the huge number of files because of command line length limitations.
tar -cf out.tar -T <(compgen -G '*.pdf')
Command Substitution (Might break command length limitations?)
tar -cf out.tar `compgen -G '*.pdf'`
I tested.
Process Substitution woks, Command Substitution breaks due to argument list length.
I also tested with
tar --appendwith bothfindandxargs. The results suggest that append is much slower.