help-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-tar] Listing (tv) with strip-components does not work as expec


From: Sergey Poznyakoff
Subject: Re: [Help-tar] Listing (tv) with strip-components does not work as expected
Date: Mon, 28 Aug 2017 16:30:41 +0300

Hi Vincent,

> I tried to use "--strip-components=1" alongside "-tv" to see if
> it will do what I want, but it does not strip...

It does not, ideed. Quoting GNU Tar Manual, section 6.7 "Modifying File
and Member Names":

     If you add the `--verbose' (`-v') option to the invocation above,
     you will note that the verbose listing still contains the full file
     name, with the [...] removed components still in place.  This can be
     inconvenient, so `tar' provides a special option for altering this
     behavior:

     `--show-transformed-names'
          Display file or member names with all requested
          transformations applied.
               
(end of quote).

So, instead of  

   tar --strip-components=1 -tvf a.tar

do 

   tar --strip-components=1 --show-transformed-names -tvf a.tar

Please refer to section 6.7 (available online at 
https://www.gnu.org/software/tar/manual/html_section/tar_52.html), for
details.

Hope that helps.

Regards,
Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]