On 13/09/11 23:07, John Andersen wrote:
On 9/13/2011 12:07 AM, Tejas Guruswamy wrote:
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
David's Flash cards thru a reader vs Tejas's USB sticks are two different problems.
USB in all recent versions of OpenSuse mount in quick removal mode (aka synchronous mode) where the application receives indication that the write is complete only when it IS IN FACT complete, there is no caching, and files are closed and fat is written after each file. It makes for terrible performance, but its safer.
With a reader, depending on how it is connected, it may not appear as USB (even if it is in fact USB), in which case all bets are off, and you have to use safely remove option.
There is still a problem with Safely remove in Linux for USB. It is not the same as EJECT.
There seems no way to do an eject in KDE yet. The two are quite different, EJECT is not normally done even if you click the USB applet and select what appears to be the eject icon. This is not a problem for USB sticks that are accessed in synchronous mode.
But it can be a big problem for things that pretend to be USB devices, such as many android phones, Nook Ereaders, etc.
For these to recognize that you are truly finished, you have to EJECT. And with KDE, You have to do this from the command line, or wait a long time for your device to quiesce.
I found this out after trashing my Nook storage some time back.
@Tejas: We've been around this cactus farm before: http://lists.opensuse.org/opensuse/2010-04/msg00198.html
In the end, Will Stephanson confirmed my findings, and I thought this would be fixed but it still persists to this day on my Nook, and Android tablet: http://lists.opensuse.org/opensuse/2010-04/msg00215.html
Well reminded :). Still, a 'sync' command before removal should ensure all data is completely transferred. Are there any bugs filed either with openSUSE or KDE on this issue? Regards, Tejas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org