RE: How copy /usr contents to a new partition?



On Fri, 2006-01-13 at 06:52 -0700, STYMA, ROBERT E (ROBERT) wrote:
> >
> > I want to copy /usr to a new partition and then attach that
> > at /usr. I
> > issued a command
> >
> > cp -options(recursive included) /usr /mnt/"mountpoint
> >
> I often use the following syntax to copy directory structures and
> preserve permissions, dates, soft links, etc.
>
> intially name /mnt/"mountpoint /mnt/usr
>
> (cd /;tar cf - usr) | (cd /mnt; tar xf - )
>
> After that you can name the mountpoint whatever you want.
>
> Bob Styma
>
>

heheh...one of the wonderful things about *x is that we can do it so
many ways. my favorite is:
cd /usr
find . -print | cpio -dump /mnt/<yourmountpoint>

if there are things you don't want to move, say huge .iso files, you can
filter them out with grep before cpio sees them.

i'd settled on cpio years ago because it's a byte copy, as opposed to a
block copy like tar. the difference can make a huge difference if you
are moving tons of small files. less difference if you are moving only
very large files.

john



--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Difference between cpio copy and tar copy
    ... I recently had to dump almost 100 Gbyte of data from a mounted read only ... Lo and behold, the above command worked. ... operation well before the cpio stopped seemingly gracefully. ... Singapore Science Park II ...
    (SunManagers)
  • Re: File Copy
    ... a terminal and not at the console, have you looked for messages on the ... command might seem to hang, but there should be "no space" messages on the ... As for some kind of status display, the "v" option in that cpio command ...
    (comp.unix.sco.misc)
  • RE: Data transfer from one HD to another
    ... Is there an EASY method to transfer the partitions from an old hard ... command "dd". ... Other commands that may be used are: tar & cpio (man tar & man cpio for ...
    (freebsd-stable)
  • Re: Data transfer from one HD to another
    ... I presume you want to trasfer all the files from one ... command "dd". ... Other commands that may be used are: tar & cpio (man tar & man cpio for ...
    (freebsd-stable)