cp Options question REVISITED

From: RICHARD BROMBERG (dickbrom_at_worldnet.att.net)
Date: 06/25/05


Date: Sat, 25 Jun 2005 13:19:33 GMT

I am using the routine listed below to copy all the files with a specific
file extension form the hard drive to USB external drive.

Unfortunately it fails to copy the path information and that results in all
the files going into the root of the external drive.

Files originally in seperate folders all go into the root and some ge
overwritten.

Any help would be appreciated.

su # go to root
mount -o ro /dev/hda1 /mnt/hda1 # mount devices
mount -o rw /dev/ubb1 /mnt/ubb1
cd /mnt/hda1 # go to hard drive

find /mnt/hda1 -name '*.doc' -exec cp {} /mnt/ubb1 \;


Quantcast