[Toybox] I hate the GNU design aesthetic.

mtsl8 at widemage.net mtsl8 at widemage.net
Wed Sep 28 09:31:55 PDT 2022


On 2022-09-28 2:40, Rob Landley wrote:

>   In addition, several transformation scope flags are supported, that
>   control to files transformations apply. These are:
> 
>   ‘r’ Apply transformation to regular archive members.
>   ‘R’ Do not apply transformation to regular archive members.
>   ‘s’ Apply transformation to symbolic link targets.
>   ‘S’ Do not apply transformation to symbolic link targets.
>   ‘h’ Apply transformation to hard link targets.
>   ‘H’ Do not apply transformation to hard link targets.
> 

a bit further down the page and they slide in an extra trick that you
don't actually have to write "flags=" if you add the flag at the end..?:

```
5. Archive the ‘/lib’ directory, prepending ‘/usr/local’ to each archive 
member:

     $ tar --transform 's,^,/usr/local/,S' -c -f arch.tar /lib

Notice the use of flags in the last example.
The ‘/lib’ directory often contains many symbolic links to files within 
it.

...

Using the expression ‘s,^,/usr/local/,’ would mean adding ‘/usr/local’
to both regular archive members and to link targets.

...

This is definitely not desired.
To avoid this, the ‘S’ flag is used, which excludes
symbolic link targets from filename transformations.

``` https://www.gnu.org/software/tar/manual/tar.html#transform

_______________________________________________



More information about the Toybox mailing list