This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Automatically Check MD5 Sums After Moving files?

2

Votes
2
0
Tags: None
(comma "," separated)
Xplorer4x4
Registered Member
Posts
206
Karma
0
OS
Being new to Linux/Kubuntu I am not sure this is really necessary compared to Windows, but I am looking for an alternative to TeraCopy. It replaces the standard dialog of windows for moving/copying files and gives you a progress report of the move(which Kubuntu already does) but more importantly when the operation is complete TeraCopy does an MD5 calculation to ensure that the newly moved/copied files are not corrupt. Also, it does not add additional items to the context menu, it simply activates when you use the standard copy/cut and paste command already in the context menu.

I tried using Ultracopier, but it fails to actually integrate in to Kubuntu to automatically handle file transfers.

Last edited by Xplorer4x4 on Thu Jul 12, 2012 2:26 pm, edited 1 time in total.


Intel Core i7 2600K CPU
MSI P67A-G45 Mobo
2x4GB Corsair Vengance RAM
Sapphire Raedon 4890HD Vapor-X GPU
1x180 GB Intel 330 SSD
1x80GB Intel X25-M G2 SSD
2x1TB Western Digital HDDs
2x2TB Wester Digital HDDS
Corsair HX520W PSU
Thermaltake Mozart TX Case
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Moved this to the Dolphin forum so that the Dolphin developers can look at this.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
freininghaus
Moderator
Posts
224
Karma
1
OS
Sorry for the very late reply and thanks for the suggestion!

I don't think that we should calculate md5 sums by default. I see that this is useful sometimes, but most of the time, the md5 sums of the files you are pasting are not interesting. It would just waste CPU cycles then, and the display of the unneeded md5 sum would probably be confusing or even annoying for most users.
Xplorer4x4
Registered Member
Posts
206
Karma
0
OS
freininghaus wrote:Sorry for the very late reply and thanks for the suggestion!

I don't think that we should calculate md5 sums by default. I see that this is useful sometimes, but most of the time, the md5 sums of the files you are pasting are not interesting.

Better late then never! :P

It's not that the md5 is interesting, but rather the fact you can sit back and have complete confidence that your files were transfered with no data loss. I think maybe a screen shot will help convey the point:
http://imgur.com/BuPEG

Actually looking at the screen shot I stole off google, I see it is using CRC rather then md5. Not sure that this makes much difference but throwing it out there as a just in case.

[code] It would just waste CPU cycles then, and the display of the unneeded md5 sum would probably be confusing or even annoying for most users.[/quote]
I disagree on the confusing part simply because it could be explained to the use via knotice or kdialog upon initiating a file movement for the first time. Then again, the average linux user is already a power user to an extent, imo, and already knows what an md5 is.

You could be right on the cpu front, but I have only used it backed by a Core 2 Quad Q6600 at minimum(might not have started using terra copy until I switched to an i7). So I can not fairly comment on this but I suspect a simple


Intel Core i7 2600K CPU
MSI P67A-G45 Mobo
2x4GB Corsair Vengance RAM
Sapphire Raedon 4890HD Vapor-X GPU
1x180 GB Intel 330 SSD
1x80GB Intel X25-M G2 SSD
2x1TB Western Digital HDDs
2x2TB Wester Digital HDDS
Corsair HX520W PSU
Thermaltake Mozart TX Case
freininghaus
Moderator
Posts
224
Karma
1
OS
Xplorer4x4 wrote:I disagree on the confusing part simply because it could be explained to the use via knotice or kdialog upon initiating a file movement for the first time. Then again, the average linux user is already a power user to an extent, imo, and already knows what an md5 is.


Dolphin isn't really targeted at power users. And if I think about the Dolphin users I know personally, I don't know many who care about md5 sums. But in any case, any such dialog would have to be provided by KIO or lib/konq. Dolphin itself does not do file operations, it uses these libraries for that.
Xplorer4x4
Registered Member
Posts
206
Karma
0
OS
freininghaus wrote:
Xplorer4x4 wrote:I disagree on the confusing part simply because it could be explained to the use via knotice or kdialog upon initiating a file movement for the first time. Then again, the average linux user is already a power user to an extent, imo, and already knows what an md5 is.


Dolphin isn't really targeted at power users. And if I think about the Dolphin users I know personally, I don't know many who care about md5 sums. But in any case, any such dialog would have to be provided by KIO or lib/konq. Dolphin itself does not do file operations, it uses these libraries for that.


Like I said, crc not md5. Also in terms of user confusion and such, this is actually standard in Windows 8 when using the nonwhatever you want to calli(non metro) UI. Off the top of my head I don't recall if they use md5 or crc. As time goes on, given Microsoft's percentage of the market share, more and more people will come from Windows to linux distros using KDE(and other UIs of coure but that's not the point here. I am not saying it should be done "because Windows does it" but rather because it is a good idea. Plus it was done by CodeSector(makers of TeraCopy) before M$ anyways.

Anyways since this is not dolphin related, maybe you can move it to the right place or point me in the right direction? Sorry if this is a bit of a cluster .. but trying to rush. :p


Intel Core i7 2600K CPU
MSI P67A-G45 Mobo
2x4GB Corsair Vengance RAM
Sapphire Raedon 4890HD Vapor-X GPU
1x180 GB Intel 330 SSD
1x80GB Intel X25-M G2 SSD
2x1TB Western Digital HDDs
2x2TB Wester Digital HDDS
Corsair HX520W PSU
Thermaltake Mozart TX Case
User avatar
google01103
Manager
Posts
6668
Karma
25
if you are looking to have functionality added to KDE then the Brainstorm forum is the appropriate place


OpenSuse Leap 42.1 x64, Plasma 5.x

Xplorer4x4
Registered Member
Posts
206
Karma
0
OS
google01103 wrote:if you are looking to have functionality added to KDE then the Brainstorm forum is the appropriate place

So can I get it moved there. I don;t see the point in opening another topic on the same issue.


Intel Core i7 2600K CPU
MSI P67A-G45 Mobo
2x4GB Corsair Vengance RAM
Sapphire Raedon 4890HD Vapor-X GPU
1x180 GB Intel 330 SSD
1x80GB Intel X25-M G2 SSD
2x1TB Western Digital HDDs
2x2TB Wester Digital HDDS
Corsair HX520W PSU
Thermaltake Mozart TX Case
airdrik
Registered Member
Posts
1854
Karma
5
OS
With the option to retry (automatically(up to n tries)/manually(pop-up box asking what to do)/configurable?) the operation on failed check?


airdrik, proud to be a member of KDE forums since 2008-Dec.
Xplorer4x4
Registered Member
Posts
206
Karma
0
OS
airdrik wrote:With the option to retry (automatically(up to n tries)/manually(pop-up box asking what to do)/configurable?) the operation on failed check?



Sorry, didn't quite understand what you meant.


Intel Core i7 2600K CPU
MSI P67A-G45 Mobo
2x4GB Corsair Vengance RAM
Sapphire Raedon 4890HD Vapor-X GPU
1x180 GB Intel 330 SSD
1x80GB Intel X25-M G2 SSD
2x1TB Western Digital HDDs
2x2TB Wester Digital HDDS
Corsair HX520W PSU
Thermaltake Mozart TX Case
User avatar
Fri13
Registered Member
Posts
397
Karma
4
OS
It should be optional in settings and turned off by default.

It should be also possible depending setting, to skip or calculate the check after copying.

Like I typically copy/move big files (250MB-10GB) what takes already time from 30s to 30min. So I don't really want to spend extra time (30-30min) to do any file checking. Because mostly I am in horry to do so.

The file checking shouldn't even be need to be done. As it is operating system task to do the file copying itself. Actually from operating system functions it is filesystem depending function, that written data is then checked, marked to possible (if enabled/having) filesystem journal, after it has been flushed to filesystem from RAM.

Linux cache all file transfers to RAM first, that is reason why Unix were from beginning much faster to write/read data from storage devices than what DOS or NT operating systems were by Microsoft.

The problem is that depending filesystem, the data has not actually not always written to storage device but is still being buffered in RAM and from there flushed later to storage. So i.e when copying a 100MB file to memory stick (what is Flash) from HDD and it says after 15 seconds copying "Done". It probably has copied only 60MB to it. Rest are waiting to be completed in better time. You see the whole file in filemanagers as operating system keeps track of file data where it is, so you can access and modify it right away. But if you then eject the storage media without un-mounting (umount) it first, the data in RAM isn't written to storage device and is lost. You end up to corrupted file in storage device.

The CRC/MD5/SHA1 etc checks would demand that program that is doing the file writing, is forcing operating system to actually flush all the data to storage device so it can calculate it from there. It cause lots of overhead to filesystem and over system performance.

Penalty on those isn't just CPU cycles being used for check, but lots of Linux operating system tasks being interrupted from efficient working condition.

The main function in operating system is that it doesn't lose data ever. That's why we have filesystems what has journaling features what keeps track where file blocks are so if middle of writing electricity is cut off and computer shuts down, you don't lose data what was being written, but operating system can read from filesystem journal that what file action was interupted and can mark file being still in its original position as whole instead partial.

The short functionality goes:

1. User wants to move/copy file from HDD to Flash
2. User use filemanager application to execute command to move/copy file from X directory to Y directory
3. Filemanager program pass the executed command to other system progams/libraries what then executes it operated by operating system.
4. Operating system starts copying bits of that file by marking it to filesystem journal it is being copied/moved and reading it to RAM when technically possible and then writing them to target device when possible.
5. After operating system has red the data, it informs it as "copied" to process what was doing it, while the real data can still be in RAM waiting time to be flushed to target.
6. After the data is flushed from RAM to target filesystem, it removes the journal marking from original filesystem that it has been finished.

If anything between marking and unmarking journal happens what causes malfunction (power cut etc), data isn't lost from original place.

CRC/MD5/SHA1/etc calculation is good when there is no proof that destination device is working correctly. Example when copying over network, the execution on receiver end would be needed, but usually denied because calculation is heavy load for it.

I think the MD5/CRC/SHA1 checks could actually be done by Dolphin dual panel mode (F3) where you select file on left and file on right and then click from actions menu "compare hash sum" and then it does it. Or if only one file selected in one view mode or multiple different files, you get "check hash sum" what just prints files hashes and can be copied to clipboard.

That can be done then manually easily after every file action if needed and files without copying/moving them and easily.
airdrik
Registered Member
Posts
1854
Karma
5
OS
Xplorer4x4 wrote:
airdrik wrote:With the option to retry (automatically(up to n tries)/manually(pop-up box asking what to do)/configurable?) the operation on failed check?



Sorry, didn't quite understand what you meant.


What I meant is that if the check sum comparison fails (file copied isn't identical, therefore was corrupted on copy), then the user has a decision: delete the copied file (abort/back out operation/revert if the copy was overwriting another prior version of the file if possible/feasible?), retry copy operation or leave the corrupted version as copied. This decision could be presented to the user when the check fails, or optionally the check sum configuration could be set to automatically retry the copy up to some configurable number of times (most likely somewhere between 2-5), and if it fails after each of the configurable number of retries then the user is asked how to proceed.


airdrik, proud to be a member of KDE forums since 2008-Dec.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell