cpio … is/was it used to unpack/repack initrd images? I have a faint recollection of doing that once or twice.
I’ve used star (“unique standard tape archiver”) as it could do something (extra attributes?) that plain tar did not. Alas, the star is not in el9 either.
Just figured our why I use pax. find var/www ! -name *~ | pax -wvf ${dirName}/${fileName}
I pipe the output of find commands to pax and it happily makes archives.
tar will not take a file list from standard in, and tar has a error exit when I put the find command like this: tar -cvjf myfile.tar.bz2 find /var/www ! -name \*~
Tried it. I am making a relative archive without the leading / while in the root directory. Resulted in errors.
find var/www ! -name *~ | tar -cvjfT ~/tmp/test.tar.bz2 -
tar: Removing leading `/’ from member names
tar: /root/tmp/test.tar.bz2: Cannot stat: No such file or directory
tar: -: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
But whether I use an absolute or relative archive, it still gives the errors.
Yes, ‘info tar’ but also ‘man tar’ has a clear intro showing the different style of command line switches, traditional (old) and unix (new). You can also do a lot without needing the pipe and find command.