China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-27 10:09
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » How to compare two files View 595 Replies 5
Original Poster Posted 2004-02-21 00:00 ·  中国 湖北 武汉 电信
初级用户
Credits 130
Posts 7
Joined 2004-02-21 00:00
22-year member
UID 18046
Gender Male
Status Offline
How do I use the FC command to compare two files
and show only their differences
Thanks
Floor 2 Posted 2004-02-21 00:00 ·  中国 北京 东城区 联通
银牌会员
★★★
nre
Credits 1,210
Posts 361
Joined 2002-12-28 00:00
23-year member
UID 629
Gender Male
Status Offline
fc /b compare in binary mode
fc /l compare in ASCII mode
For example, fc /l x:\1.txt x:\2.txt >3.txt compares 1.txt and 2.txt in binary mode and saves the result to 3.txt in the current directory

Teamwork !
Floor 3 Posted 2004-02-21 00:00 ·  中国 湖北 武汉 电信
初级用户
Credits 130
Posts 7
Joined 2004-02-21 00:00
22-year member
UID 18046
Gender Male
Status Offline
But if you do it that way
even the identical parts are shown
Floor 4 Posted 2004-02-21 00:00 ·  中国 湖北 武汉 电信
初级用户
Credits 130
Posts 7
Joined 2004-02-21 00:00
22-year member
UID 18046
Gender Male
Status Offline
But if you do it that way
even the identical parts are shown
Floor 5 Posted 2004-02-24 00:00 ·  中国 上海 鹏博士宽带
高级用户
★★
zhri
Credits 665
Posts 153
Joined 2004-02-23 00:00
22-year member
UID 18241
Gender Male
Status Offline
Can the comp command do it?

It can show the first 10 places where the two files differ
Floor 6 Posted 2004-02-26 00:00 ·  中国 重庆 电信
中级用户
电筒
Credits 279
Posts 47
Joined 2004-02-24 00:00
22-year member
UID 18341
Gender Male
Status Offline
I personally think NRE's method is better
Forum Jump: