Re: poorly set up symlinks

Matthew Hiller (matthew.hiller@yale.edu)
Sat, 27 Feb 1999 15:44:46 -0500 (EST)

Another thing I just realized,

You must've done something like

$ mv /usr /hdd

To change the device that /usr is really on. I don't think
something like this deals w/ symlinks correctly; there are other ways of
copying over the tree that do, I think (someone correct me if I'm wrong).
The two main ones are:

$ cd /hdd
$ tar -cf - -C / usr | tar -xvpf -

or

$ cp -pr /usr /hdd

They differ in how they handle symlinks. The former will recreate
links in the new location, the latter converts symlinks to files. (For
that reason, the former's better.)

(This info is in O'Reilly's Essential System Administration by
Aeleen Frisch. Picking up this book - or one like it that's more
Linux-specific - probably wouldn't be a bad idea.)

Matt