On Mon, 6 Dec 2004, Dave Feustel wrote:The (possibly surprising) thing to remember here is Otto's example assumes you are following his steps as outlined. Yes, both of them. pax will recreate paths all relative to . (read: here) in /mnt so if for some reason you need to be in different directories, you'll need to remember the same rules you have to remember for, say, rsync which has a similar habit of confusing me with path interpretation and giving me more nested levels than I intended.My original /usr partition is not big enough to hold OpenBSD source, so I have added another disk to which I have copied (cp -Rp /usr /mnt) and then have untarred source gz files from the 3.6 cdrom to /mnt. My plan is to mount this disk at /usr, replacing the partition which contains the original /usr. I noticed that the copied /usr partition is somewhat larger than the original. Is there anything else I need to do before I change the /usr entry in /etc/fstab?
Never copy just with cp -Rp , use:cd /usr pax -rw -pe . /mntcp will mangle hard links, soft links, device nodes and what more.
Joe's own version of the Linux Gazette's feature, "2 Cent Tips". Collected from around the web, with references where possible. Satisfaction guaranteed or you can go google for yourself.
Saturday, August 18, 2012
Never copy with just 'cp'
Something from way back on openbsd-misc@ from Otto Moerbeek. I've long ago lost the reference, unfortunately:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment