cp Options Question (Knoppix)

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


Date: Thu, 23 Jun 2005 18:10:16 GMT

I am working in the Terminal Window and I have mounted the hard drive and a
usb external hard drive.
mount -o ro /dev/hda1 /mnt/hda1

mount -o rw /dev/uba1 /mnt/uba1

/dev/hda1 has a folder called mystuff .

I have not mastered the cp command. What I want to do is copy all files
with a particular extension
,for example .doc from /dev/hda1 to the mystuff folder on /dev/uba1 .
Since there will be identical filenames in some of the folders/dev/hda1 ,
for example readme.doc, I want to preserve the original directory structure
within the mystuff folder.

I am pretty sure this can be done, but I haven't been able to figure out the
options on the cp command.

Any help would be appreciated.


Quantcast