Re: how to (r)sync group-ownerships?
- From: Dave B <daveb@xxxxxxxxxxxx>
- Date: Mon, 23 Jun 2008 18:09:00 +0200
peter pilsl wrote:
My problem is:
After tar and retar some gids are wrong.
On the source-system the gid of a certain file was 101 and on the
target-system its now 102. This happenend for a unknown number of
files/directories. I've discoverered 4 such problems till now.
I'm looking for a way to set the gids on the targetsystem according to
the source-system without transferring/updating the files itself (the
content) cause its a huge number of files, a slow networkconnection and
the files on the targetsystems already have been alterers.
At your own risk: you could generate a script (on the source system) that
chowns the files with the appropriate owners, something eg like (on the
source system)
find /src/dir -type f -printf "chown %U:%G '%p'\n" > script.sh
(assuming /src/dir is what you tarred in the first place)
Then, on the target system, run script.sh in the directory where you
unpacked the tarball. Make sure that you understand what script.sh does, and
double / triple check that the filenames inside it make sense on the target
system in the directory from which you run it (which, as I said, should be
the one where you unpacked the tarball).
Also please note that the script assumes that your files do not have single
quotes in their names (other funny characters should be ok though).
--
D.
.
- Follow-Ups:
- Re: how to (r)sync group-ownerships?
- From: Dave B
- Re: how to (r)sync group-ownerships?
- References:
- how to (r)sync group-ownerships?
- From: peter pilsl
- Re: how to (r)sync group-ownerships?
- From: Walter Mautner
- Re: how to (r)sync group-ownerships?
- From: peter pilsl
- how to (r)sync group-ownerships?
- Prev by Date: Re: Graphical text editor for fluxbox with tabs
- Next by Date: Re: how to (r)sync group-ownerships?
- Previous by thread: Re: how to (r)sync group-ownerships?
- Next by thread: Re: how to (r)sync group-ownerships?
- Index(es):
Relevant Pages
|