On 12/09/11 15:53, David C. Rankin wrote:
On 09/11/2011 07:27 AM, George Olson wrote:
I have written a few bash scripts for synching files to a memory stick and I am wondering, is there a way to execute a script by making an icon and clicking on it from kde? I know how to execute the scripts from the command line using . or sh already, but I haven't been able to figure out how to execute by clicking on the file's icon.
Thanks George
George,
Be aware that copy, or rsync, operations directly from flash memory cards through a laptop based card reader can result in jpeg corruption. Portions of the jpeg header can be corrupted resulting in unreadable files. This can occur even though the image thumbnails are preserved intact. Always confirm that jpeg (or any images for that point) have been copied correctly by opening the image up in gimp/kview/feh whatever before overwriting the original on the memory card.
I don't know why this occurs, but I have experienced this corruption a number of times copying files within bash scripts from flash cards mounted under /media/disk. Simply using a 'cp -ur filespec' can cause the problems discussed. These copy errors are unrecoverable 99% of the time.
Copying from normal thumb drives that have been written to via USB don't seem to have this problem, but copying photos that have been written to the memory stick by a camera do show this type of corruption. I haven't found an answer to why this occurs. I've just gone back to using digikam to download images from cameras rather than pulling the flash card and copying the files directly from the memory stick via a card-reader and bash script.
Are you sure you're allowing the flash drive to filesystem sync before removing it? (eject and WAIT till it's done before remove, to be extra safe go to cmdline and issue 'sync' commands.) If yes, you've discovered a weird filesystem bug which is serious business and needs to be tracked down before someone loses important data. (Or it could be a bug in your camera -- bad fs, or memory stick reader hardware or software, or even a bad memory stick?) If not, remember that reads/writes to flash media can be heavily cached to protect the limited read/write lifetimes of the drives, and you absolutely must sync / eject before removing. It's certainly not a fundamental linux problem, I've transfered to/from memory sticks written to by cameras for years with no problems. Regards, Tejas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org