如何比较的所有文件的内容对另一目录的目录? [英] How do I compare the contents of all the files in a directory against another directory?

查看:105
本文介绍了如何比较的所有文件的内容对另一目录的目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一堆的C文件的目录, .C .H ,另一个非常类似的一个同事发送了有非常微小的差异,由于更新了,我想看看这些差异是文件的目录。

I have a directory with a bunch of C files, .c and .h, and another very similar directory of files that a coworker has sent that have very minor differences, due to an update, and I'd like to see what those differences are.

我可以手动运行上的每个文件差异,但它们命名同样是有反正我可以做到更快,轻松查看哪些文件是不同的,是什么让他们有什么不同?

I could run a diff on every file manually, but as they're named the same is there anyway I could do it quicker and easily see which files are different and what makes them different?

推荐答案

差异命令能够做到这一点。刚刚尝试:

diff command is able do it. Just try:

diff directory1 directory2

这篇关于如何比较的所有文件的内容对另一目录的目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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