Bill Jonas on Wed, 5 Jul 2000 04:14:50 -0400 (EDT) |
On Tue, 4 Jul 2000, Jason wrote: >I want to move an entire system (on a single partition) to another >hard drive with as little hassle as possible. I could use cp -rpd for >most of it but how do I deal with the contents of /dev? Do I really >need to actually install a system on the new drive? GNU cp is a wonderful thing. First, mount the new disk under, say, /mnt. Then you'll need to make directories such as /mnt/mnt and /mnt/proc, and any others that you won't be copying for whatever reason. Then, all you have to do, for each directory other than the ones you already made on the new disk (don't copy /proc, and obviously, don't copy /mnt), is: # cp -a /dirname /mnt/dirname The -a option indicates 'archive', and is equivalent to some other combination of options (check the man page for details). And it handles device files and symbolic links just fine (although you'll probably wind up with two actual copies on disk of any hard links). You'll probably also want to 'umask 000' before you start, but I could be wrong on this. HTH, Bill -- >Ever heard of .cshrc? | "Linux means never having to delete That's a city in Bosnia. Right? | your love mail." -- Don Marti (Discussion in comp.os.linux.misc | http://www.billjonas.com/ on the intuitiveness of commands.) | http://www.harrybrowne.org/ ______________________________________________________________________ Philadelphia Linux Users Group - http://plug.nothinbut.net Announcements - http://lists.nothinbut.net/mail/listinfo/plug-announce General Discussion - http://lists.nothinbut.net/mail/listinfo/plug
|
|