Skip to main content

Timeline for Why would I tar a single file?

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
Apr 21, 2016 at 14:35 history edited alexis CC BY-SA 3.0
mention that gzip also records the original filename
Apr 21, 2016 at 14:33 comment added alexis Thanks for pointing this out, I hadn't known that. Still, since that's not the default behavior, the point stands: Distributing a file in tar format preserves the original filename (and possibly the relative path), without intervention of the recipient. Distributing a (g)zipped file doesn't.
Apr 21, 2016 at 3:12 comment added Miles Yup. The name is optional in the gzip header—obviously there won't be one if you compressed the streaming output of a command—and most tools won't restore it by default (for instance, you have to use gzip --name explicitly when decompressing), but you don't have to use tar to get filename persistence.
Apr 21, 2016 at 0:59 comment added psusi gzip also records the original filename.
Apr 20, 2016 at 20:58 history edited alexis CC BY-SA 3.0
edited body
Apr 20, 2016 at 20:41 history answered alexis CC BY-SA 3.0