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



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.
cp never seems to do what I want, so I'd
sudo -s
tar clC / usr | tar xpC /mnt/mountpoint

which has the great merit of being easily extended to copy between machines:
tar clC / usr | \ssh otherbox tar xpC /mnt/mountpoint[1]

and of course one can compress or not.


Also, is there a command which compares each file under two directory trees for difference.(I want to verify after the above operation)

diff


1
I got caught one or twice: I have set ssh to an alias:
alias ssh='ssh -t'
and that breaks piping stuff across the network. Use of the backslash prevents use of the alias.




--

Cheers
John

-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxxxxxxxxx
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/

do not reply off-list

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



Relevant Pages

  • How copy /usr contents to a new partition?
    ... I want to copy /usr to a new partition and then attach that at /usr. ... This resulted in the creation of a new "usr" directory under ... is there a command which compares each file under two directory trees for difference. ...
    (Fedora)
  • Re: OT: the rm bug hit me again
    ... And the -f in the rm command it to stop the "Confirm delete?" ... My rm is set to confirm all deletes using alias. ... the reason is to help prevent those type human errors when you are root ... I personally like the prompt because it reminds me that I am running as ...
    (Fedora)
  • Re: Def alias error in RACF
    ... to define an Alias in a RACF environment with z/OS V1.7 release? ... At the moment to send the request in command line (through the RACF ... Actually, that's a TSO command, not a RACF command. ...
    (bit.listserv.ibm-main)
  • Re: OT: the rm bug hit me again
    ... And the -f in the rm command it to stop the "Confirm delete?" ... That's not a good idea as it teaches you to expect to be prompted, and you'll be bitten badly some time when the alias isn't present. ... the reason is to help prevent those type human errors when you are root ... A user who expects rm to prompt will only delete their own files if it doesn't, a root user who expects rm to prompt can delete the entire system if it doesn't. ...
    (Fedora)
  • TCPIP glitch wih aliases
    ... I needed to move the cluster alias IP from an alpha to a vax. ... Turns out the above command disabled all IPs on the WE0 interface, AND zapped the permanent routes from the active database. ... doing IFCONFIG WE0 10.0.0.11 up seemed to work, but it did not restor the routes so that node had no way to reach IPs outside its subnet. ...
    (comp.os.vms)