Diff files present in two different directories

前端 未结 8 2095
你的背包
你的背包 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 16:51

    If you are only interested to see the files that differ, you may use:

    diff -qr dir_one dir_two | sort
    

    Option "q" will only show the files that differ but not the content that differ, and "sort" will arrange the output alphabetically.

提交回复
热议问题