Date: Fri, 25 Oct 2002 10:07:24 -0400 (EDT) From: Jerry McAllister <jerrymc@clunix.cl.msu.edu> To: jrs@rootshell.be (rootjrs) Cc: freebsd-questions@FreeBSD.ORG Subject: Re: perl / ksh help Message-ID: <200210251407.g9PE7OX04737@clunix.cl.msu.edu> In-Reply-To: <Pine.LNX.4.44.0210251405260.537-100000@phenix.rootshell.be> from "rootjrs" at Oct 25, 2002 02:06:33 PM
next in thread | previous in thread | raw e-mail | index | archive | help
>
>
> hi,
>
> I know some one has already done this and I need a little help. I have
> two identical directories on two seperate machines. The files were
> moved over fromm machine a to machine b. Everything is working
> properly on machine b but all of the permissions were lost.
>
> I've done the following:
>
> (machine a)# find ./ -ls -print > perm.list
>
> Gave me the file listing and permisions
>
> (machine a)# cat perm.list | awk '{print $4," ",$11}' > newperm.list
>
> This removed garbage like date owners etc that I didn't need.
>
> Now I'm stuck with a file that looks like this:
>
> -rw-r--r-- ./data/dir/data/getme.bin.old
> -rw-rw-rw- ./data/dir/data/stp.501
> drwxrwxrwx ./data/dir/data/realgoodgold
> -rwsr-xr-x ./data/dir/exe/help
If you have the directory on mach a with the perms you want, then
why don't you just tar that dir up with the '-p' flag to preserve
permissions. Then make the directory where you want it and untar
it all, again using '-p' on the other machine .
It should do what I think you might be saying here.
on mach a:
cd /dir-you-want-to-move
tar cvpf ../stuff.tar *
move tar file to mach b
on mach b:
mkdir /where-you-want-stuff-to-go
cd /where-you-want-stuff-to-go
tar xvpf ./stuff.tar
voila!
////jerry
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210251407.g9PE7OX04737>
