[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tar-bug
Subject:    Re: '--strip-components=NUMBER' option does work as expected
From:       "Sergey Poznyakoff" <gray () gnu ! org ! ua>
Date:       2021-04-27 15:26:09
Message-ID: 20210427172609.32578 () pirx ! gnu ! org ! ua
[Download RAW message or body]

Dedeco Balaco <dedeco.balaco@yahoo.com> ha escrit:

> the tar option '--strip-components=NUMBER' does not work as expected.

Actually, it does.  Absolute file name checking[1] occurs before file
name transformation[2].  I that's not needed, use the -P option, e.g.:

  -P --strip-components=3

Regards,
Sergey

[1] https://www.gnu.org/software/tar/manual/html_node/absolute.html
[2] https://www.gnu.org/software/tar/manual/html_node/transform.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic