[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Copy all except one



Thus spake Russell (rjshaw@iprimus.com.au):

> Hi,
> 
> I want to copy everything from hda2 to hdd2, where
> hdd2 is mounted as /mnt on hda2.
> 
> I think a cp recursive would cause a loop, so can i
> exclude /mnt easily, or would i need to make a bash
> script?

Use the -x ('stay on this filesystem') flag

-- 
|Deryk Barker, Computer Science Dept. | Music does not have to be understood|
|Camosun College, Victoria, BC, Canada| It has to be listened to.           |
|email: dbarker@camosun.bc.ca         |                                     |
|phone: +1 250 370 4452               |         Hermann Scherchen.          |



Reply to: