[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] Changing file name when adding in to an archive.

From: Nikolay Shaplov
Subject: [Bug-tar] Changing file name when adding in to an archive.
Date: Wed, 19 Aug 2009 14:18:30 +0400

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.

As far as I can get, tar were created as a tool for creating backup
copies of some files, in order to put them back if they were damaged
somehow. And here the is no need in changing name while adding files to
tar archive.

But now it is used for many other purposes, for example for
distributing files, and here it is not always
necessary to create an exact copy, sometimes this copy should be
somehow modified, I mean name sould be modifiled.

One simple example, I have a today log file of some program,
my_program.log (and this name can't be changed), and if I want to add it
to a tar under a name my_program_2009.08.19.log, I should first of all
create a copy of my log-file with new name, and then tar it. I can't
specify new name in tar's argument.

Another example, now real one: I am creating tarball of project's
source-code. I have list of files that should be included here. And
according to tradition source files should be in dir
<project_name>_<version_name>. But in what dir this project were really
checked out, I have no control. It would be good if I can change file
name when I adding it to a tarball. But now I have to create a copy of
all sources before tarring them, and it is a lot of work, because
really there are several versions of tarballs are created, and I would
have to copy sources at least twice...

If a feature changing name while adding file to archive would be added
it would make lives of other developers, who met the same problem, more

Certainly I might missed something while reading manuals and google...
It is, please excuse me... May be we will try to make it more easy to
understand after it ;-)

reply via email to

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