4 Replies - 1008 Views - Last Post: 03 June 2015 - 01:13 AM

#1 dsnowdon   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 221
  • Joined: 18-January 12

Checking to file/folder structures to see if they are an exact match

Posted 02 June 2015 - 06:33 AM

I have just make a back up and would like to check if the the backup is an exact match with the original.

Is there a way to do this by using the command line?, The two folders are on a QNAP Nas, the operating system is Linux.

If that's not possible would the best solution be to create a program say in Java to run though and check the files and folders. I don't really need to check the contents of the files just the presents of the files and folders that just to save time as there is a lot of files, each folder could have multiple sub folders down multiple levels.

Thanks in advance for any input.

Is This A Good Question/Topic? 0
  • +

Replies To: Checking to file/folder structures to see if they are an exact match

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14175
  • View blog
  • Posts: 56,782
  • Joined: 12-June 08

Re: Checking to file/folder structures to see if they are an exact match

Posted 02 June 2015 - 08:20 AM

Typically you would check the file hash, right? MD5 or sha-1.
Was This Post Helpful? 0
  • +
  • -

#3 dsnowdon   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 221
  • Joined: 18-January 12

Re: Checking to file/folder structures to see if they are an exact match

Posted 03 June 2015 - 12:15 AM

View Postmodi123_1, on 02 June 2015 - 08:20 AM, said:

Typically you would check the file hash, right? MD5 or sha-1.



Would that been of the most parent folder in both structures. And would that work work for all the files and folder down the structure?

This post has been edited by dsnowdon: 03 June 2015 - 12:16 AM

Was This Post Helpful? 0
  • +
  • -

#4 dsnowdon   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 221
  • Joined: 18-January 12

Re: Checking to file/folder structures to see if they are an exact match

Posted 03 June 2015 - 12:29 AM

Thanks I think I got it. I used a snip-it from
http://stackoverflow...-of-a-directory
Was This Post Helpful? 0
  • +
  • -

#5 dsnowdon   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 221
  • Joined: 18-January 12

Re: Checking to file/folder structures to see if they are an exact match

Posted 03 June 2015 - 01:13 AM

Should this happen? the hash of the directory's are:

md5 of backup = d41d8cd98f00b204e9800998ecf8427e
md5 of office drive = d41d8cd98f00b204e9800998ecf8427e

But when checking the size on the disk the folders sizes are
External harddrive: 276 gb
and on the Qnap: 243 gb

Its not filling me with confidence that this is a exact copy.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1