Skip to content

Comment on A weird CPIO discrepancyparent

Comments

You can do it with GNU tar -T but it often requires shell redirection or spawning a process to be concise.

    tar zcvf tarball.tar.gz -T <(file_name_generator_function_or_process)
Or
    echo /etc/hosts | tar zcvf tarball.tar.gz -T-

I'm long in the tooth enough to remember when tar on SunOS was used for system and data backups to SCSI tape drives.

Not SunOS, but this was on AIX (V3, so long ago) tar, but thanks for the gnu-tar parameter hint!

I miss using the word tarballs, I really like that word.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.