Ubuntu GNOME 下不错的 diff 工具
有人能给我一些关于 Ubuntu 上 diff 工具的建议吗?其实我需要的不仅仅是文件比较,还需要目录比较。
我觉得Windows下的diff工具确实是最方便的,尤其是WinMerge。
但是在Ubuntu下,我能高效得到的只有TkDiff,但它只支持文件比较?
希望能从这里得到一些帮助。
Could somebody give me some recommendations on diff tools on Ubuntu? Actually what I need is not just file comparison, but also directory comparison.
I think diff tools under Windows is really most convenient, especially WinMerge.
But under Ubuntu, what I can get with high efficiency is only TkDiff, but it only support file comparison?
Hope to get some help from here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
Meld 是一个积极开发的开源面向开发人员的基于 GUI 的 diff 实用程序。
Meld is an actively-developed, open-source GUI-based diff utility targeted at developers.
我通常使用 kdiff3 并对此感到满意。它也可以处理目录。
I usually use
kdiff3
and happy with it. It can handle directories too.它不是免费软件,但 Beyond Compare 现在可用于 Linux。我没有使用过 Linux 版本,但发现 BC2 对于在 Windows 上合并和比较文件和目录非常有用。
It's not free software, but Beyond Compare is now available for Linux. I haven't used the Linux version but found BC2 invaluable for merging and comparing files and directories on Windows.
我使用 Krusader::Synchronize Directory (Ctrl+Y) 工具来完成此任务。
它会比较目录并选择较新的文件自动重写较旧的文件,然后您可以检查差异列表并在必要时比较文件内容(kdiff、kompare 或 xxdiff)。
最后,您可以启动同步操作(复制文件)本身。
对于该工具来说,正确设置文件时间戳(修改时间)至关重要。
I'm using the Krusader::Synchronize Directories (Ctrl+Y) tool for this task.
It compares directories and selects a newer files to rewrite the older ones automatically, then you can check the list of the differences and compare the files content (kdiff, kompare or xxdiff) while necessary.
Finally you can start the synchronize action (copying files) itself.
It is crucial for this tool to have a file timestamps (modification time) set correctly.
尽管不是开源的,
p4merge
是免费的,并且可以在 Linux、Windows 和 Mac 上使用。如果你习惯了 Perforce,也会感觉很熟悉。我个人的喜好是
kdiff3
,但值得一提的是p4merge
。Although not opensource,
p4merge
is free and available on Linux, Windows and Mac. If you are used to Perforce, it will also feel familiar.My personal taste is
kdiff3
butp4merge
worth to be mentioned.虽然我每次都发现
kdiff3
极其混乱,但对于简单的任务,我喜欢dirdiff
实用程序(请参阅 其手册页)。它是一个图形工具,虽然合并功能不强,但它可以让您快速概览相关差异(通过执行“文件 -> 隐藏选择”隐藏不相关)。While I find
kdiff3
utmostly confusing every time, for simple tasks I like thedirdiff
utility (see its manpage). It is a graphical tool, and while not strong in features for merging, it lets you get a quick overview of relevant differences (hide non-relevant by doing "File -> Hide selection").