[101981] in RedHat Linux List
Re: cpio question
daemon@ATHENA.MIT.EDU (Jan Carlson)
Mon Nov 30 17:32:40 1998
Date: Mon, 30 Nov 1998 17:25:03 -0500
From: Jan Carlson <janc@iname.com>
To: redhat-list@redhat.com
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Ramon Gandia wrote:
> I am copying one partition to another using cpio, but empty
> directory trees are not being copied; also, if I use the
> -d option (create leading directories when needed), I get
> permissions of 700 ( drwx------ )
# cd /old
# find . -print | cpio -pdmuv /new
This should duplicate everything (owner, group, perms)
if you run it as root, and /old and /new are local ext2 filesystems.
/new should exist and be EMPTY.
It may not set permissions on directories
until it is finished, and it normally
Check your environment for any
settings that cpio uses.
# which cpio
/bin/cpio
# rpm -qf /bin/cpio
cpio-2.4.2-9
# rpm -V cpio
# which find
/usr/bin/find
# rpm -qf /usr/bin/find
findutils-4.1-25
# rpm -V findutils
>
>
> Example:
>
> In copying this partition
>
> /bin
> /mnt <--------- this is empty
> /root
>
> by empty, I mean no FILES. There are other directories, like
> /mnt/floppy and /mnt/cdrom in there, but no files.
>
> Now, I give the command:
>
> prompt# find . -mount | cpio -pvumd /some
>
> and when I do an ls -la on /some I get:
>
> /bin permission 700
> /root permission 700
>
> but no /mnt.
>
> Is there an option, command, or trick that will accomplish
> what I want; ie, create the empty directory tree?
>
> Also, in the above scenario, the permissions for /bin and /root
> are set to 700. Is there a way for cpio to read the current
> ownership/permissions from these directories?
>
> --
> Ramon Gandia ==== Sysadmin ==== Nook Net ==== http://www.nook.net
> 285 West First Avenue rfg@nook.net
> P.O. Box 970 tel. 907-443-7575
> Nome, Alaska 99762-0970 ======================= fax. 907-443-2487
>
> --
> PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
> http://www.redhat.com http://archive.redhat.com
> To unsubscribe: mail redhat-list-request@redhat.com with
> "unsubscribe" as the Subject.
--
Jan Carlson
janc@iname.com Scarborough, Ontario, Canada
Mailed with Netscape 4.5 on Red Hat Linux 5.2
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com http://archive.redhat.com
To unsubscribe: mail redhat-list-request@redhat.com with
"unsubscribe" as the Subject.