On 14/01/12 21:11, (Ted Harding) wrote: []
but now, of course,
cp -a /* /media/sda1/WinLinMachine/LinuxFiles
will not work, because the external drive is mounted under / and so will be itself copied and recopied in an infinite recursion. There would be no problem if there was an "exclude" option for 'cp' (say "-X") so that
cp -a -X /media /* /media/sda1/WinLinMachine/LinuxFiles
would inhibit anything under /media from being copied. But I can find no such option for 'cp'.
So how to proceed???
Tongue in cheek answer: http://lmgtfy.com/?q=linux+copy+one+directory+to+a+subdirectory+excluding+di...
Slightly more helpful answer: rsync will copy and has an exclude option. Above URL will give examples.
HTH Steve