Comparing directories list the files as different although the are the same file name, size and date

358 views
Skip to first unread message

Per Hansen

unread,
Mar 20, 2016, 6:59:37 PM3/20/16
to krusader-users
Hi
I have Krusader installed on Ubuntu 14.04 LTS. I use the compare function in synchronizer tool to look at file differences in directories.
I now have a two directories with a file of the exactly same file name, size and date. But the compare function show they are different. When I use diff or cmp command in Terminal there is no difference. What could be the reason that Krusader say they are different, and which information does the compare function use to distinguish between files.

Best regards
P. Hansen

apok

unread,
Mar 21, 2016, 12:52:32 PM3/21/16
to krusade...@googlegroups.com
On Sun, 20 Mar 2016 15:59:37 -0700 (PDT)
Per Hansen <samo...@gmail.com> wrote:

Do the 2 files have the same md5sum?

which information does the compare function use to
> distinguish between files.

I don't know, but you could check this in the source code.


Per Hansen

unread,
Mar 21, 2016, 6:34:44 PM3/21/16
to krusader-users

Yes they both have the md5sum - 23853505b916bf9457fcc779755f5737. 

I have downloaded the source code, and tried to find the compare function, but I am not into C++ so it is rather difficult for me.


Best regards

P. Hansen

Martin Kotelnik

unread,
Mar 21, 2016, 7:21:22 PM3/21/16
to krusader-users
Hi!

I believe I've replicate your issue - is one of the files a link to the other file? Anyway this leads to the behaviour you've described...

Martin

Dne pondělí 21. března 2016 23:34:44 UTC+1 Per Hansen napsal(a):

Per Hansen

unread,
Mar 21, 2016, 7:39:22 PM3/21/16
to krusader-users
Hi Martin

I have discovered the issue when I was going through several disks which has been used as backup. This meant that a lot of directories appeared a number of times. The file in question is arduino-1.0.1-windows.zip, but I have encountered the issue on other files. I can make a list if you wish.


Best regards

P. Hansen

Martin Kotelnik

unread,
Mar 22, 2016, 12:59:06 PM3/22/16
to krusader-users
Hi again :)

Thanks for clarification. So I'll try to present some tests you can do to narrow the issue so I can possibly simulate it on my rig and repair it.

Has the other disk a different filesystem then linux one (e.g. ntfs)? Can you please try to copy the file in question to a temporary local directory (so both files are on the same disk) and make the comparison with Synchronizer again? Is the file still marked as different?

What exactly is your Synchronizer settings (I mean "Follow symlinks", "Ignore date",... checkboxes)? Have you tried to play with the settings?

Thanks You,
Martin

Dne úterý 22. března 2016 0:39:22 UTC+1 Per Hansen napsal(a):

Per Hansen

unread,
Mar 22, 2016, 7:52:14 PM3/22/16
to krusader-users
Hi Martin

I may have found the reason. I should have used the stat command in Terminal to display the file properties. You wont see these details using the ls, diff or cmp command. As you notice, there is a 2 second time difference in the last modified time. I don’t know how this happened because I am certain that the files originates from the same source. But somewhere in the multiple backup/copy processes I have made on different OS and file systems, something did change.


hansen@PC01:~/Desktop/Arduino$ stat arduino-1.0.1-windows.zip

File: ‘arduino-1.0.1-windows.zip’

Size: 90663176 Blocks: 177080 IO Block: 4096 regular file

Device: 812h/2066d Inode: 10764288 Links: 1

Access: (0600/-rw-------) Uid: ( 1000/ hansen) Gid: ( 1000/ hansen)

Access: 2016-03-22 23:25:36.610148816 +0100

Modify: 2012-09-27 18:40:42.000000000 +0200

Change: 2016-03-20 14:14:17.675003894 +0100


hansen@PC01:~/Desktop/Arduino_s$ stat arduino-1.0.1-windows.zip

File: ‘arduino-1.0.1-windows.zip’

Size: 90663176 Blocks: 177088 IO Block: 4096 regular file

Device: 812h/2066d Inode: 14027055 Links: 1

Access: (0600/-rw-------) Uid: ( 1000/ hansen) Gid: ( 1000/ hansen)

Access: 2016-03-22 23:22:35.542148730 +0100

Modify: 2012-09-27 18:40:40.781250000 +0200

Change: 2016-03-20 14:14:34.883003991 +0100


Please excuse me for my poor knowledge of Ubuntu and thank you for your time.


Best regards


P. Hansen

Martin Kotelnik

unread,
Mar 23, 2016, 1:06:41 PM3/23/16
to krusader-users
Hi Per,

there is no need to apologise. I'm glad you resolved it :-).

Kind Regards,
Martin
Reply all
Reply to author
Forward
0 new messages