diff 命令的 Windows 等价物是什么? [英] What is the Windows equivalent of the diff command?

查看:34
本文介绍了diff 命令的 Windows 等价物是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有一个类似的帖子:此处.
我尝试使用它提到的 comp 命令,但是如果我有两个文件,一个带有像abcd"这样的数据,另一个带有abcde"这样的数据,它只是说这些文件的大小不同.我想知道他们到底有什么不同.在 Unix 中,简单的 diff 告诉我哪一行和哪一列,如果我有像abd"和abc"这样的东西,windows 中的 comp 命令可以工作.不是别的.有什么想法可以用于此目的吗?

I know that there is a post similar to this : here.
I tried using the comp command like it mentioned, but if I have two files, one with data like "abcd" and the other with data "abcde", it just says the files are of different sizes. I wanted to know where exactly they differ. In Unix, the simple diff tells me which row and column, the comp command in windows works if I have something like "abd" and "abc". Not otherwise. Any ideas what I can use for this?

推荐答案

在 CMD shell 或批处理文件中运行:

Run this in the CMD shell or batch file:

FC file1 file2

FC 也可以用来比较二进制文件:

FC can also be used to compare binary files:

FC /B file1 file2

这篇关于diff 命令的 Windows 等价物是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆