Is it possible to set an arbitrary path within a tar archive to place files which may not exist on your original filesystem? This differs from the -C switch in that I may want to take a back up of /etc/, but place it in the archive as /configurations/etc/.
In GNU tar,
--transform
(--xform
) is the option to make file name transformations. Documentation and examples can be found hereIn BSD tar,
-s pattern
is the option to make name transformations. Quoting from freebsd.org documentation: