Diff files present in two different directories

前端 未结 8 2054
你的背包
你的背包 2020-11-30 16:23

I have two directories with the same list of files. I need to compare all the files present in both the directories using the diff command. Is there a simple co

相关标签:
8条回答
  • 2020-11-30 17:08

    Try this:

    diff -rq /path/to/folder1 /path/to/folder2      
    
    0 讨论(0)
  • 2020-11-30 17:10

    You can use the diff command for that:

    diff -bur folder1/ folder2/
    

    This will output a recursive diff that ignore spaces, with a unified context:

    • b flag means ignoring whitespace
    • u flag means a unified context (3 lines before and after)
    • r flag means recursive
    0 讨论(0)
提交回复
热议问题