The Wednesday 2005-08-31 at 17:29 +0530, Arun K. Khan wrote:
Yes, dd will copy the whole device. To copy a specific directory, I would just "cp --archive" or "tar" it to a file on your new HDD as shown below:
cd <to dir to copy> tar -c -S -f - . | (cd <to new dir> && tar -x -p -v -f -)
Remember that Alfred, the OP, already said that tar failed: |> I tried to put it all in a tarball - after 5 days I stopped it. The |> tarballwas 2 GB at that time.
He is talking of more than a million files (10^6) in a single directory, each file about 20 Kb. I might possibly suggest trying to use rsync (but I'm afraid that it might also fall over). Another (although horrible) suggestion might be to use find. Assume that the source directory is mounted as /usr/localfoo and the target
On Wednesday 31 August 2005 10:13 am, Carlos E. R. wrote:
directory is mounted on /mnt:
cd /usr/local/foo
find . -type f -exec cp -p {} /mnt \;
This is assuming that /usr/local/foo does not have subdirectories. You can
set appropriate flags in find to prevent recursion.
Another possibility is to partition the output into a number of
subdirectories:
Assume that you may have directories: /mnt/a, /mnt/b, ...
find . -name \[aA\] -exec cp -p {} /mnt/a \;
In any case, as I mentioned, my solutions are not very good.
Note that a 64-bit system might handle this better.
--
Jerry Feldman