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 13:20 +0530, Parameshwara Bhat wrote:
> Hello List,
> 
> 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
> 
> This resulted in the creation of a new "usr" directory under  
> /mnt/"mountpoint"/usr and contents of /usr went into sub-directories. What  
> I want is to copy all the subdirectories and files directly under /usr to  
> go at /mnt/"mountpoint" for obvious reasons. How do I do that? "Man cp"  
> did not give me any clue.
> 
> Also, is there a command which compares each file under two directory  
> trees for difference.(I want to verify after the above operation)

How about:

# cp -a /usr/* /mnt/"mountpoint"/

This won't get any files whose names starting with "." directly
under /usr, but you probably don't have any of those anyway:

$ ls -al /usr

Paul.


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

  Powered by Linux