[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] TAR strip leading paths
From: |
Tomas M |
Subject: |
[Bug-tar] TAR strip leading paths |
Date: |
Tue, 23 Jan 2007 13:55:08 +0100 |
User-agent: |
Thunderbird 1.5.0.9 (Windows/20061207) |
Good morning.
I'd like to create a tar archive from few directories and combine them
to a single directory in Tar. This is a task for Tar guru I guess, as I
am unable to find the solution in documentation.
For example, I'd like to pack
/usr/local/modules/*
/var/modules/*
to a single Tar archive, which will only contain (this is my problem)
the files (and directories) from the dirs mentioned above
combined into root, but without the leading path.
I tried
tar --create --file output.tar /var/modules/* /usr/local/modules/*
but this doesn't do the job, because output.tar contains full both the
directories.
It could be possible if tar accepts some option to strip leading paths
somehow, then it would strip '/usr/local/modules' and '/var/modules' and
preserve only the file names... But I can't find such an option.
I think my goal could be done somehow by using symlinks and
--dereference option. But I'd like to create the Tar by a command,
without writing new symlinks to disk.
Is it possible without symlinks?
I think if this is possible then it requires some advanced knowledge of Tar.
Thank you very much
Tomas M
slax.org
- [Bug-tar] TAR strip leading paths,
Tomas M <=