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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux