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/.
Linux – How to you designate an arbitrary leading path when adding files to a tar
linuxtar
Related Topic
- Tricks for speeding up tar while tarring up a huge directory of little files
- Tar – Avoid Archiving Files Larger Than Certain Size
- Linux – Tar dereference only 1 level
- Linux – untar all files in specific directory but not the directory
- Force tar to ignore/skip errors while compressing files
- Shell command to filter out non-existing files in a pipe
Best Answer
In GNU tar,
--transform
(--xform
) is the option to make file name transformations. Documentation and examples can be found here