1

Linux常用命令-77:diff

 1 year ago
source link: https://xugaoxiang.com/2022/06/26/linux-cmds-77-diff/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

diff 命令以逐行的方式,比较文本文件的异同。如果指定的是文件夹,则 diff 只会比较目录中相同文件名的文件,但不会去比较其中的子目录。

语法格式:diff [参数] [目录]

常用参数:

6137202b66c1fddd.png
diff test1.py test2.py
cfd538be0e4d3ce9.png

其中, "<" 表示 test2.pytest1.py 少了一行内容,">" 表示 test2.pytest1.py 多了一行内容


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK