On 2023/08/03 07:23, Jason McIntyre wrote: > On Wed, Aug 02, 2023 at 05:52:02PM -0400, aisha wrote: > > Hi, > > Someone - https://www.youtube.com/watch?v=NQ5uD5x8vzg - mentioned that > > our man page for tar(1) doesn't have an extract example, so I thought it > > would be good to add a simple one which highlights a common use case. > > > > OK? > > > > hi. > > the examples section is small enough that i suppose it wouldn;t be a > problem to add another one.
as it must be specified in a non-obvious place on the command line and it's not currently explained particularly clearly, I'd welcome an example using -C. > it does add another example with a similar set of options though, all in > a different order. i wonder whether we should try and push the action as > the first option, so people can see what we're doing. so "cXXX" when the > example is to create, "tXXX" when listing? then keep the "vzf" options > that are so common in the same order? > > then the second example is probably more helpful as "Create a gzip(1) > compressed archive blah.tgz". > > i know this isn;t what you're posting about, so feel free to leave alone > if you don;t want to tackle that. > > one more thing. you could as easily remove the text "the folder", but > i'd be tempted to use "directory", as that's more standard for our docs, > and how -C itself describes it. strongly agree on options order and "directory". > jmc > > > Index: tar.1 > > =================================================================== > > RCS file: /cvs/src/bin/pax/tar.1,v > > retrieving revision 1.64 > > diff -u -p -r1.64 tar.1 > > --- tar.1 31 Mar 2022 17:27:14 -0000 1.64 > > +++ tar.1 2 Aug 2023 21:47:12 -0000 > > @@ -359,6 +359,13 @@ Note that the glob pattern has been quot > > .Pp > > .Dl $ tar tvzf backup.tar.gz '*.jpeg' > > .Pp > > +Verbosely extract an archive, called > > +.Pa foo-backup.tar.gz , > > +to the folder > > +.Pa /var/foo : > > +.Pp > > +.Dl $ tar xzvf foo-backup.tar.gz -C /var/foo > > +.Pp > > For more detailed examples, see > > .Xr pax 1 . > > .Sh DIAGNOSTICS > > >