Solved

Comparing Directory Structures/Files (perferably with a checksum)

Posted on 2003-11-20
2
365 Views
Last Modified: 2010-04-21
I have to different directories that I would like to compar bit by bit, byte by byte......
I would like to compare them using some kind of check sum preferably. and to top this
all off its too much to do manualy and it needs to be done regularly with minimal effort preferd....

Thanks...
0
Comment
Question by:EHart7
2 Comments
 
LVL 24

Accepted Solution

by:
shivsa earned 180 total points
ID: 9795364
GNU has Diffutils.
This is the manual link. I think it may solve your purpose.

http://tuxisland.org/download/documentations/diffutils/diff.pdf.
0
 
LVL 20

Assisted Solution

by:Gns
Gns earned 70 total points
ID: 9798024
As shivsa says, diff is probably the easy route here... something like
diff -r --brief dir1 dir2
would perhaps be enough? This will just report whether there are any differences between the directories (files only in one place or the other, if the files differ... If they match, this is "silent").
I use this in a script to check some wget mirror data for ... "new arivals" (it's for antivirus updates).

One could of course do something interresting with find and md5sum, but it would perhaps be a bit .... overkill.

-- Glenn
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now