Problem copying large amount of files from IDE external case in Fedora C4
hi
i got some 15gb of files im trying to copy from an external ide case (connected trough usb) drive patitition (ntfs -> i installed linux-ntfs (cant post link :s)) to my home folder. I can read ALL files in original folder trough file brower; Im logged in as root (otherwise couldnt mount external ide partits). After copy process im missing some 300 files ~1gb in destination folders, spread by many completly different subfolder/subfolder/files.xpto single files (not a single subfolder). im trying to identify and copy those missing files manually atm. No error displayed any time during process copy. Apparently it just "forgot" some 300 files during mass copy. It this 'possible'? Any ideas? linux-ntfs 'copy()' bug? thx |
Damn! Missing 100 files or so. so many folders i just cant go on. anyone know of an easy way to "compare" the two folders content? so i can identify and copy the missing files?
any1 got any little app that does it or src code? chiuf ill be out 4 coffe 4 a while. bbl to continue my file finding and school programming saga. |
If you are using the external drive, it has to have a mount point. A mount point is a directory, off the linux root directory tree somewhere where the disk is mounted.
Launch a console cd to the mount point of the external: cd /mnt/usbdrive run this command: cp<space>-r<space>*<space>/home/sam/directory Don't run the command exactly like that, change the last part to where your are copying your files. I know you can do it. The Portugese are awesome people. You have great capability. I have faith in you. |
Ok, ill try copying it trough the console.
But shouldnt it give the same results anyway? Oh, and thanks 4 that ego-lifting thing, why do u guys always do that anyway? Very inspiring. lol Edit: ive cleaned up what i had in dest folder (so that i dont hav to click 'y' 7000 times) and im copying now. this is gonna take a while... |
Quote:
If so, it is common opinion that writing to NTFS in Linux is tricky and unreliable. It would explain the many missing files and the wrong subdirectories etc. If so, why did you create an NTFS partition in Linux? ext3 is much more suitable. If not, I don't have a clue either. jlinkels |
nope only the source is ntfs. i only installed linux-ntfs in order to able to mount it.
thx anyway ^^ |
Console copy result:
Copied 7104 files. 7229 total, still missing 125 files... puf! any can get me C code for getting index of all files in a folder so i can build an app to solve the problem? i could compare those existing in original folder with those in dest folder and copy those that dont exist. And if i am to use this disk often i really need it. i know how to get and copy a specific file, dunno how to get all in a specific location tough. |
Since you are running out of options, why not give rsync a try?
Rsync is associated with Samba (see: http://rsync.samba.org/ ) and was originally developed for copying across networks. It works fine on local files and only copies files that have changed. Using ntfs files as a source may cause problems, but it's worth a try. Using rsync is a lot like using cp: rsync -r /mnt/source/ /mnt/destination/ That would recursively copy whatever was in /mnt/source to /mnt/destination. In a linux-type filesystem setting, you would usually run it like this: rsync -a /mnt/source/ /mnt/destination/ where -a is archival and is similar to cp archival copies. Since the concept of preserving the owner, group, permission, etc. does not really apply to ntfs files, the -a option might have unexpected consequences when copying ntfs files. You could always try -a v.s -r on a small directory and see what happens. In any case, you can always run chown, chgrp and chmod after you're finished. For more details, see: man rsync |
OK, try this. Every device has a /dev device file. Look in /etc/fstab and find the device that corresponds to your usb HDD. Then do:
dd if=/dev/usbdevice of=/home/sam/usbpartition.bin bs=4096 conv=notrunc,noerror Then do: mkdir /mnt/usbpartition Then put this in /etc/fstab: /home/sam/usbpartition.bin<space>/mnt/usbpartition<space>filesystemonusbdrive(ext3,reiserfs,NTFS,msdos,etc)<space>defaults<space>0<space>0 Then do: mount -o loop /mnt/usbpartition cd /mnt/usbpartition See if dd copied everything. Then do: cp -r * /home/sam/recoverydirectory cd /home/sam/recoverydirectory Check for all files. I have faith in you. I think this will work, and it shouldn't take very long. |
All times are GMT -5. The time now is 04:00 PM. |