Re: [Help-tar] tar list of dirs from STDIN - *just the dirs* (to save perms)

2017-11-29 Thread Sergey Poznyakoff
Hi Tom,

> Based on what you say, appears this section of the tar texinfo manual
> is incorrect, since "--no-recursion" has nothing following it:

Yes, you're right. This has already been fixed in the repository.

Regards,
Sergey



Re: [Help-tar] tar list of dirs from STDIN - *just the dirs* (to save perms)

2017-11-29 Thread help-tar
Thanks Sergey!

On Wed 11/29/17 11:26 +0200 Sergey Poznyakoff wrote:
> > $ echo ~/.config/ | tar -cvf /dev/null -T - --no-recursion 2>&1 |head -4
> 
> The '--no-recursion' option modifies the behavior of options and
> arguments that follow it. The way you use it it has no effect. The
> correct way:
> 
>   $ echo ~/.config/ | tar -cvf /dev/null --no-recursion -T - 2>&1 |head -4
> 
> For details, please see the GNU tar manual, subsection 3.4.4
> "Position-Sensitive Options".

Thanks for the reference.

--
Based on what you say, appears this section of the tar texinfo manual
is incorrect, since "--no-recursion" has nothing following it:

6.9 Descending into Directories
--snip
Specifying '--no-recursion' is a way to tell 'tar' to grab only the 
directory
entries given to it, adding no new files on its own.  To summarize, if
you use 'find' to create a list of files to be stored in an archive, use
it as follows:
 
 $ find DIR TESTS | \
   tar -cf ARCHIVE -T - --no-recursion

--
regards,
Tom
--

Yes it works!:

$ echo ~/.config/ | tar -cvf /dev/null --no-recursion -T - 
tar: Removing leading `/' from member names
/a/myself/.config/
$




Re: [Help-tar] tar list of dirs from STDIN - *just the dirs* (to save perms)

2017-11-29 Thread Sergey Poznyakoff
Hi,

> $ echo ~/.config/ | tar -cvf /dev/null -T - --no-recursion 2>&1 |head -4

The '--no-recursion' option modifies the behavior of options and
arguments that follow it. The way you use it it has no effect. The
correct way:

  $ echo ~/.config/ | tar -cvf /dev/null --no-recursion -T - 2>&1 |head -4

For details, please see the GNU tar manual, subsection 3.4.4
"Position-Sensitive Options".

Regards,
Sergey