"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> I need to create a tarfile that will be untarred using
> tar's P option (absolute paths), but the absolute

> directory that I archiving is not the same as the
> absolute directory I want tar to extract into.
>
> For example, I want to archive /home/dir1/dir2, but
> have it extract into /home/dir2.
>
> I can't use relative paths because the users' already
> have the script that contains the tar extract command
> (tar xvzpPf...)

I am not sure what you like to do but you could use star's

s=replstr       Apply ed like pattern substitution -s /old/new/gp on filenames

option to automatically modify the filenames.

Up to 100 patterns are supported.

BTW: tar has no -P option.

star implements -P to write partial last records (since 1986)
Sun tar implements -P to prevent adding a slash ("/") to directory names.

Maybe you were speaking about gtar?



 
J�rg

-- 
 EMail:[EMAIL PROTECTED] (home) J�rg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]        (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily


_______________________________________________
Bug-tar mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-tar

Reply via email to