Find the answer to your Linux question:
Results 1 to 2 of 2
hello, can someone help me figure out how to byte compare 2 hard drives against each other. i need to know the commands to compare all files in every directory ...
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    1

    how to byte compare 2 hard drives

    hello,

    can someone help me figure out how to byte compare 2 hard drives against each other.

    i need to know the commands to compare all files in every directory against each other?

    and then byte by byte on the entire drive?


    is this possible?

    thanks

  2. #2
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    665
    uh, you could do
    diff /dev/sda /dev/sdb
    but I immagine that would be pretty unreadable, even if it worked. another option would be to cd to the root of a drive (wherever it is mounted) and run

    tree > /temp/file

    cd to the other drive's root

    tree > /temp/file2
    diff /temp/file /temp/file2

    but this will just tell you if there are any files that are on one and not the other, not what is IN the file. For a byte by byte comparison, you would need to diff files together, not drives.
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...