Greetings All,
I am currently engaged in copying files from a desktop
machine to an external USB hard drive.
The machine has both Windows 98 and Linux on it, and
dual-boots. Because Win98 does not recognise the external
drive, while the Linux installation does, I'm booting
into Linux to do the copying.
The objective is to transfer every file on the desktop
onto the external drive. The external drive is mounted
as /media/sda1 in Linux, and has a vfat filesystem.
The Windows drives \C, \D, \E, \F are mounted, when the
machine is booted into Linux, as:
/windows/C /windows/D ... /windows/F
With the Windows files, no problem: I make the directories
/media/sda1/WinLinMachine/C
(and similar for .../D, .../E, .../F, these being all the
Windows drives). Then I do the likes of:
cd /windows/C
cp -a * /media/sda1/WinLinMachine/C
(and similar for D, E and F). This has worked fine.
However, I now want to copy over all the Linux files
as well. I have made a directory
/media/sda1/WinLinMachine/LinuxFiles
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???
With thanks,
Ted.
----------------------------------
E-Mail: (Ted Harding) <Ted.Harding(a)wlandres.net>
Date: 14-Jan-2012
Time: 20:49:49
This message was sent by XFMail
----------------------------------