Find the answer to your Linux question:
Results 1 to 2 of 2
1/ I haven't catch the difference between dwdiff, diff or dircomp If one wants to only output files (JPEG, doc, etc.), which have been created, absent or modified The command: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    1

    difference btw diff and dwdiff and other cmd line


    1/ I haven't catch the difference between dwdiff, diff or dircomp

    If one wants to only output files (JPEG, doc, etc.), which have been created, absent or modified
    The command:
    diff -r -q
    works well, any advantage for another command?
    Subtilities between commands for issues like:
    * identical content, but renamed files
    * identical names & date & weight, but different content (virus)

    2/ Is there a way to tell diff to store in a specific directory all missmatched files?
    Something as
    diff - r -q oldBackup actualData /media/sda1/discrepant
    Where diff would store in media/sda1/discrepant all files which are new or modified after comparison between oldBackup and actualData

    Thanks.

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    679
    Quote Originally Posted by live View Post
    2/ Is there a way to tell diff to store in a specific directory all missmatched files?
    Something as
    diff - r -q oldBackup actualData /media/sda1/discrepant
    Where diff would store in media/sda1/discrepant all files which are new or modified after comparison between oldBackup and actualData
    That is what redirection is for.
    Code:
    diff - r -q oldBackup actualData  > /media/sda1/discrepant
    
    or
    
    diff - r -q oldBackup actualData  | tee /media/sda1/discrepant
    The first puts the data only in the file while the second scrolls it on the screen and puts it into the file.

    Other diff programs include (but not limited to):
    tkdiff, vimdiff, gvimdiff, tkdiff, bsdiff, dirdiff, vbindiff, easydiff, kdiff3, colordiff, adiff, diffpdf, ssddiff, wdiff, xmldiff, cmp, comm

Posting Permissions

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