On Wed, 7 May 1997, Robert D. Hilliard wrote: > On Date: Wed, 07 May 1997 "David B. Teague" <[EMAIL PROTECTED]> wrote: > > On Tue, 6 May 1997, Robert D. Hilliard wrote: > > > > > cp -ax certainly is much simpler than using find and cpio. Is > > > there any option to cp (I can't find one) that would keep it from > > > copying /proc, like the -prune option in find? > > > > Isn't /proc a mounted file system, even if it is a pseudo file system? > > Doesn't that make x option (which prevents other mounted file systems > > from being copied) the solution to this problem? > > Apparently not. I made a directory /newproc and tried cp with > the following results: > > root:vc-6:~>cp -a -x /proc /newproc > root:vc-6:~>du -s /proc > 0 /proc > root:vc-6:~>du -s /newproc > 23936 /newproc > > I stopped the copy with ^C when I got tired of watching it sit > there, so /newproc might have grown larger if I had more patience. > This is not an adequate test of the feature. You have side stepped the -x lockout by specifying you wish to copy the file system /proc. The proper opperation of -x would only keep other file systems, mounted on /proc, from being copied. The reason /newproc grows indefinately is that /proc is always having new data added to it. The /proc file system knows how to "replace" old data with new, but the ext2 file system just keeps adding the new data to the old files. I have a test machine with two Linux partitions. One partition has a "standard" system installed, the other was empty. I mounted the second partition on /mnt and did:
cp -a -x / /mnt When the prompt returned, everything but /mnt and /proc could be found on the /mnt partition. I added these two mount points, edited /etc/fstab and changed the mount partition to the new one and rebooted. I didn't have time to try anything "difficult", but the system seems to be complete and functional. (at least I could log in, mount the old partition, and run mc) This process DOES work with the GNU cp provided with the Debian system. Luck, Dwarf -- _-_-_-_-_-_- _-_-_-_-_-_-_- aka Dale Scheetz Phone: 1 (904) 656-9769 Flexible Software 11000 McCrackin Road e-mail: [EMAIL PROTECTED] Tallahassee, FL 32308 _-_-_-_-_-_- If you don't see what you want, just ask _-_-_-_-_-_-_- -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .