[H-GEN] cp incantation

Greg Black gjb at gbch.net
Wed Apr 20 21:12:13 EDT 2005


On 2005-04-21, Doug South wrote:

> cp -L -preserve=all -r /usr /mnt/hda6

In normal Unix usage, cp(1) is the wrong tool to use, even
though modern versions of it do have much of the functionality
you're looking for.  The "correct" modern tool is pax(1):

    pax -rwvtpe /usr /mnt/hda6

Drop the 'v' if you don't want to see what it's doing.

If you don't have pax, the next tool to try is tar(1):

    tar -cf- /usr | ( cd /mnt/hda6 ; tar -xvf- )

Again, drop the 'v' as above.

Obviously, do all the above as root.

Greg




More information about the General mailing list