bug-tar
[Top][All Lists]
Advanced

[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 10:43:11 -0000
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

Good morning.

I'd like to create a tar archive from several directory sources and combine them to single directory in Tar. This is a task for Tar guru.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]