[英]How to compare two same name files in different directories using meld (without giving their path)?
I know commands: 我知道命令:
To find path of file: 查找文件路径:
find . -name filename
To compare two files: 比较两个文件:
meld path_of_file_in_one_dir path_of_file_in_second_dir
I have to compare so many files in different sub directories of a directory, every time I have to first search the path of that file and then use this path with meld
, and this I have to for each file. 每次必须首先搜索该文件的路径,然后将该路径与
meld
一起使用时,我必须比较目录的不同子目录中的这么多文件,而我必须对每个文件使用此路径。
It would be very easy if i only give names and root directory of that files to meld
. 如果仅将这些文件的名称和根目录提供给
meld
,那将非常容易。
How can I combine meld
and find
commands so that I can apply it on each file? 如何结合使用
meld
和find
命令,以便可以将其应用于每个文件?
then you can run the following 然后您可以运行以下命令
meld find . -name "file*"
meld find . -name "file*"
or meld find . -name "file_to_cmp"
meld find . -name "file*"
或meld find . -name "file_to_cmp"
meld find . -name "file_to_cmp"
This will compare the 3 files for sure. 这将确保比较这3个文件。
About more than three file comparing, I doubt meld can do it. 关于三个以上的文件比较,我怀疑meld可以做到。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.