On Mon, 21 Jan 2002 at 10:48pm (-0600), Manuel A. Camacho Q. wrote:

> I need to copy files from different directories in a CD-ROM to a single
> directory in my hard drive.
> 
> So far, I tried with:
> 
> find /mnt/cdrom/ -name * -type f -exec cp {}
> /home/BigDog/files/source/{} \;
> 
> but I get errors as this try to create 
> 
> /home/.../source//mnt/cdrom/.../filename
> 
> (yes, it tries to preserve the orignal directory structure with a double
> /)

I think just leave off the second {} so you give it the target dir and the 
target name is infered.  So...

find /mnt/cdrom -type f -exec cp {} /home/BigDog/files/source/ \;

M.

P.S.  I doubt '-name *' is what you want... since it expands to match what
ever files are in the dir where you run the command from... and if there 
were no files in your current workding dir.. * matches everything so is the 
same as giving no -name argument at all.

-- 
WebCentral Pty Ltd           Australia's #1 Internet Web Hosting Company
Level 1, 96 Lytton Road.           Network Operations - Systems Engineer
PO Box 4169, East Brisbane.                       phone: +61 7 3249 2500
Queensland, Australia.                            pgp key id: 0x900E515F




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to