Nikolay Shaplov wrote:
I've met a lack of functionality in tar, I really need. In short I need a possibility to add file file1 to a tar archive, but using name file2. I did not find a way to do it without renaming file on real fs... or at least it was not mention in the manuals I've read.
GNU tar's --xform option looks like it would do what you want: $ find dir1 dir1 dir1/a $ gtar-1.22 cf - --xform='s|dir1/a|foozle/q|' dir1 | tar tvf - drwxr-xr-x 0 tim tim 0 Aug 4 21:36 dir1/ -rw-r--r-- 0 tim tim 0 Aug 4 21:35 foozle/q Cheers, Tim
