From owner-freebsd-questions Fri Oct 25 7: 7:34 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 149A737B401 for ; Fri, 25 Oct 2002 07:07:33 -0700 (PDT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9043E43E4A for ; Fri, 25 Oct 2002 07:07:32 -0700 (PDT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.6+Sun/8.11.6) id g9PE7OX04737; Fri, 25 Oct 2002 10:07:24 -0400 (EDT) From: Jerry McAllister Message-Id: <200210251407.g9PE7OX04737@clunix.cl.msu.edu> Subject: Re: perl / ksh help To: jrs@rootshell.be (rootjrs) Date: Fri, 25 Oct 2002 10:07:24 -0400 (EDT) Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: from "rootjrs" at Oct 25, 2002 02:06:33 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > > 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