dircmp (比较两个目录,并报告其内容的差异)

rose1 发表于 2020-09-01 09:12
浏览次数:
在手机上阅读

在类似Unix的操作系统上,dircmp命令比较两个目录,并报告其内容的差异。

查看英文版

目录

1 dircmp 运行系统环境

2 dircmp 说明

3 dircmp 语法

4 dircmp 例子

dircmp 运行系统环境

Linux

dircmp 说明

所述dircmp命令检查directory1中和DIRECTORY2并生成有关目录内容的信息。对于所有选项,将生成每个目录唯一的文件列表。如果未输入任何选项,则输出一个列表,指示两个目录共有的文件名是否具有相同的内容。
The dircmp command examines DIRECTORY1 and DIRECTORY2 and generates information about the contents of the directories. Listings of files that are unique to each directory are generated for all the options. If no option is entered, a list is output indicating whether the file names common to both directories have the same contents.

查看英文版

查看中文版

dircmp 语法

dircmp [-d] [-s] [-w n] DIRECTORY1 DIRECTORY2

选件

-d 比较DIRECTORY1和DIRECTORY2中同名文件的内容,输出一个列表,告诉您必须更改两个文件中的内容才能使它们一致。列表格式在diff中描述。
-s 不会告诉您相同的文件。
-n 将输出行的宽度更改为n个字符。默认宽度为72。
dircmp [-d] [-s] [-w n] DIRECTORY1 DIRECTORY2

Options

-d Compare the contents of files with the same name in both DIRECTORY1 and DIRECTORY2 output a list telling what must be changed in the two files to bring them into agreement. The list format is described in diff.
-s Does not tell you about the files that are the same.
-w n Change the width of the output line to n characters. The default width is 72.

查看英文版

查看中文版

dircmp 例子

dircmp dir1 dir2

将目录dir1与目录dir2比较。下面是运行此命令时可能收到的输出示例:

Feb 8 17:18 2001 Comparison of help issues Page 1
directory .
same ./favicon.ico
same ./logo.gif
same ./question.gif
dircmp dir1 dir2

Compares the directory dir1 with the directory dir2. Below is an example of the output you may receive when running this command:

Feb 8 17:18 2001 Comparison of help issues Page 1
directory .
same ./favicon.ico
same ./logo.gif
same ./question.gif

查看英文版

查看中文版

其他命令行

date | du | dpost | dmesg | dirname | dd | deluser | depmod | deroff | df | dhclient | diff | dos2unix | dig |

如此好文,分享给朋友
发表评论
验证码:
评论列表
共0条