help-tar
[Top][All Lists]
Advanced

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

Re: [Help-tar] Amending contents of absolute-path tar files without extr


From: Sergey Poznyakoff
Subject: Re: [Help-tar] Amending contents of absolute-path tar files without extracting to root dir
Date: Tue, 12 May 2009 21:46:58 +0300

Nick Lewis <address@hidden> ha escrit:

>    I have tars that contain files with absolute paths and wish to replace
>    some of the files. However I do not wish to extract all the files into
>    the root directory as this will adversely affect operation of my
>    computer. Therefore I wish to extract the files to a subdirectory, make
>    the desired replacements and tar it all up again with the
>    paths appearing as before.

Use the --transform option, e.g.:

   tar -cf archive.tar --transform s,^,/, *

Or, if tarring the entire directory:

   tar -cf archive.tar --transform s,^\.,, .

For a detailed description of that option, refer to

   http://www.gnu.org/software/tar/manual/html_node/transform.html#IDX380

Regards,
Sergey




reply via email to

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