Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

diff of directories 1

Status
Not open for further replies.

tg2003

IS-IT--Management
Feb 6, 2003
270
IL
Hi all,

I would like to verify that a directory structure is backed up well, so I would like to compare the original structure and the backed up structure.

I'm currently using 'diff' command, but I'm not sure it is really intended for this.

Is there any checksum command in Solaris 2.9?
What is the best practice for this kind of checking?

Thanks in advance!
 
I've never used it, but md5sum might be what you need. Perhaps someone could verify?

I want to be good, is that not enough?
 
diff is designed for comparing directories as well as files, but I've not used it much for that. You may need to use the -r option to recurse through subdirectories.

Annihilannic.
 
diff -r , you might want the -q option (don't report details).

Checksums are only used for files or byte streams to see
if they compare. But checksums can be misleading.

For instance, I can take two directories whose contents are the same. Diff -r says they are the same. But if I tar
up the contents of both and checksum, it differs. Why?
Because the recorded time stamps in the tar archive are different.

If you need to compare 2 dirs over the net, I would use
rsync in the --dry-run, --delete mode.

eugene
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top