You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

NAME

compare - compare files line by line

SYNOPSIS

compare [OPTION...] FILE_A FILE_B

DESCRIPTION

Compare FILE_A vs FILE_B and generate comparison results in a new tab.

OPTIONS

-a TAB_NAME

Rename the left file name in the comparison results

-b TAB_NAME

Rename the right file name in the comparison results

EXAMPLES

To compare two files

compare FileName1 FileName2

To compare two files, renaming the first file to tab1 in the comparison results

compare -a tab1 FileName1 FileName2

To compare two files, renaming the second file to tab2 in the comparison results

compare -b tab2 FileName1 FileName2

To compare two files, renaming the first file to tab1 and renaming the second file to tab2 in the comparison results

compare -a tab1 -b tab2 FileName1 FileName2

To compare two files, renaming the first file (found in the /home/username/ directory) to tab1, and renaming the second file (found in the current working directory) to tab2 in the comparison results

compare -a tab1 -b tab2 /home/username/FileName1 FileName2

To compare two files, renaming the first file (found in the current working directory) to tab1, and renaming the second file (found in c:/directory ) to tab2 in the comparison results

compare -a tab1 -b tab2 FileName1 c:/directory/FileName2

To compare two files, renaming the first file to tab1 and renaming the second file to tab2 in the comparison results

compare -a tab1 FileName1 -b tab2 FileName2

To compare two files, renaming the first file to tab2 and renaming the second file to tab1 in the comparison results

compare -b tab2 FileName1 -a tab1 FileName2



  • No labels