[aklug] Re: tar overwriting

From: Arthur Corliss <acorliss@nevaeh-linux.org>
Date: Sat Apr 09 2011 - 20:36:38 AKDT

On Sat, 9 Apr 2011, Christopher Howard wrote:

> Can tar overwrite files, but make the new files (I'm presuming they are
> deleted and recreated) have the same ownership/permissions as the old
> (overwritten) files? I.e., rather than using the ownership/permissions
> from the archive, or simply using the standard permissions for newly
> created files. I went through the man/info pages a time or two, but I'm
> still a bit unclear as to what precise switch voodoo would make this
> happen. (Assuming it is even capable of doing that.)
>
> Something I run into when doing upgrades on software packages in Web
> directories: I set special permissions on certain files, but I lose a
> lot of them when I overlay the old files with the new files from the
> upgrade package.

You're looking for the 'p' flag, e.g, tar xvpfj foo.tar.bz2

         --Arthur Corliss
           Live Free or Die
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sat Apr 9 20:36:48 2011

This archive was generated by hypermail 2.1.8 : Sat Apr 09 2011 - 20:36:48 AKDT