document tar -vv

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

document tar -vv

Ingo Schwarze
Hi,

Philippe Meunier wrote on Mon, Oct 09, 2017 at 08:03:12AM -0400:
> [hidden email] wrote:

>> % tar cvvf -

> On a related note, it would be nice if tar(1)'s man page indicated
> that the -v option can be specified more than once to get extra
> information.  Until seeing this discussion thread I had never realized
> this was possible.

Good point, i didn't know either.

Given that tar(1) is not even specified by POSIX, i don't see
how documenting it might do harm.  The option was introduced
here:

  date: 1997/01/24 19:41:23;  author: millert;
  Support multiple -v options like GNU tar (> 1 -v means do ls-like output).

FreeBSD copied it to their tree in 2001.  So it seems firmly
established in the free software ecosystem.

OK?
  Ingo


Index: tar.1
===================================================================
RCS file: /cvs/src/bin/pax/tar.1,v
retrieving revision 1.59
diff -u -r1.59 tar.1
--- tar.1 13 Sep 2015 15:42:11 -0000 1.59
+++ tar.1 9 Oct 2017 15:25:57 -0000
@@ -266,6 +266,11 @@
 are not selected and will be skipped.
 .It Fl v
 Verbose operation mode.
+With a second
+.Fl v ,
+always use the long format for listing files, like
+.Xr ls 1
+.Fl l .
 .It Fl w
 Interactively rename files.
 This option causes

Reply | Threaded
Open this post in threaded view
|

Re: document tar -vv

Todd C. Miller
On Mon, 09 Oct 2017 17:27:46 +0200, Ingo Schwarze wrote:

> Given that tar(1) is not even specified by POSIX, i don't see
> how documenting it might do harm.  The option was introduced
> here:
>
>   date: 1997/01/24 19:41:23;  author: millert;
>   Support multiple -v options like GNU tar (> 1 -v means do ls-like output).
>
> FreeBSD copied it to their tree in 2001.  So it seems firmly
> established in the free software ecosystem.

Basically, tar -vvxf produces the same format output as tar -tvf.
If we are going to document the long format, how about something
like:

.It Fl v
Verbose operation mode.
In list mode, or if
.Fl v
is specified multiple times,
.Nm
will use a long format for listing files, similar to
.Xr ls 1
.Fl l .

Or perhaps:

.It Fl v
Verbose operation mode.
If
.Fl v
is specified multiple times or if the
.Fl t
option is also specified,
.Nm
will use a long format for listing files, similar to
.Xr ls 1
.Fl l .

 - todd

Reply | Threaded
Open this post in threaded view
|

Re: document tar -vv

Ingo Schwarze
Hi Todd,

Todd C. Miller wrote on Mon, Oct 09, 2017 at 09:35:44AM -0600:
> On Mon, 09 Oct 2017 17:27:46 +0200, Ingo Schwarze wrote:

>> Given that tar(1) is not even specified by POSIX, i don't see
>> how documenting it might do harm.  The option was introduced
>> here:
>>
>>   date: 1997/01/24 19:41:23;  author: millert;
>>   Support multiple -v options like GNU tar (> 1 -v means do ls-like output).
>>
>> FreeBSD copied it to their tree in 2001.  So it seems firmly
>> established in the free software ecosystem.

> Basically, tar -vvxf produces the same format output as tar -tvf.
> If we are going to document the long format, how about something
> like:
[...]

> .It Fl v
> Verbose operation mode.
> If
> .Fl v
> is specified multiple times or if the
> .Fl t
> option is also specified,
> .Nm
> will use a long format for listing files, similar to
> .Xr ls 1
> .Fl l .

That's better than my patch, please commit that.

Your shorter version would also be OK schwarze@, but i prefer
this one.  It avoids potential doubt about what "list mode" means.

Yours,
  Ingo