Use of diff and cmp commands
diff : This command is used to display different lines between 2 files.
Syntax:$diff <FirstFileName> <SecondFileName>
Ex: $diff f1 f2
cmp : This command is used to compare character by character, if no output, then files are same otherwise,the files are not same.
Syntax:$cmp <FirstFileName> <SecondFileName>
Ex : $cmp f1 f2
Here f1 f2 are files.
diff3 : This command is used to display different lines between 3 files.
Syntax:$diff3 <filename1> <filename2> <filename3>
Ex:$diff3 xyz subjects file
Here xyz,subjects ad file are different files.
diff : This command is used to display different lines between 2 files.
Syntax:$diff <FirstFileName> <SecondFileName>
Ex: $diff f1 f2
cmp : This command is used to compare character by character, if no output, then files are same otherwise,the files are not same.
Syntax:$cmp <FirstFileName> <SecondFileName>
Ex : $cmp f1 f2
Here f1 f2 are files.
diff3 : This command is used to display different lines between 3 files.
Syntax:$diff3 <filename1> <filename2> <filename3>
Ex:$diff3 xyz subjects file
Here xyz,subjects ad file are different files.
No comments:
Post a Comment