Saturday, July 26, 2014

Comparing files in Linux/Unix - diff, sdiff


diff and sdiff


  1. Read/scan the man page for diff with the command:
    
         man diff
         
  2. Use the diff command to determine the differences between two files:
    
         diff names1 names2
         
  3. Use the diff command to determine the differences between two directories.
    
         diff subdir1 dir4
         
  4. Try using sdiff to display the differences between names1 and names2:
    
         sdiff names1 names2
         
  5. Now try sdiff specifying that the screen width is 80 characters...not the default 130:
    
         sdiff -w 80 names1 names2
         

0 comments:

Post a Comment