| |
���������� ��������� ������ ��� ��������� ����������� ������ ���������� ���������. ��� ����������� �������� ������� ��� ��������� ������ � ������.
����������� cmp, ����� ����������, ����������� �� ��� ��������� �����. � �������� ��������� ������� ��� ����� �����, �, ���� ����� �������� ���������� ������, cmp �� ������ ����������. ���� �� ����� �����������, cmp ������� ������� � ����� ������ � ������, � ������� ���������� ��������.
����� ����������, � ��� ����������� ����� `master' � `backup', ��������:
$ cmp master backup [Enter]
����� �������� ��� ����� � �������� ����� � ��������� � ���, ����������� ������� diff. ����� � ��������� ������������� ����� �������, ����� ������ ������� (��������, patch) ����� ������������ ���, ����� ������� ������������ ����� �����������. � �������� ���������� ��� diff ����� ������� ����� ������������ ������.
����� �������� ����� `manuscript.old' � `manuscript.new', �������:
$ diff manuscript.old manuscript.new [Enter]
����� � ��������� ��������� � ���� ������������ ������; ����� ��������� ��� � ���� �� �����, ������������� ����� � ����:
$ diff manuscript.old manuscript.new > manuscript.diff [Enter]
� ���� ������ ����� ����� �������� � ����� `manuscript.diff'.
����� ��������� ������� �������� � ���� ������, ����������� ������� sdiff; ������ ��������� ������ � ���������, ��� ������� ����� � ��� �������, ����������� ���������. ������������� ������ ����������� `|'; ������, ������������� ������ � ������ �����, ������������� `<', � ������, ������������� �� ������, ���������� � `>'.
����� �������� ����� `laurel' � `hardy' �� ������, �������:
$ sdiff laurel hardy less [Enter]|
��� �������������� ��������� ���� ������ ����������� diff3.
����� ������� ����� � ��������� ����� ������� `larry', `curly', � `moe' � ���� `stooges', �������:
$ diff3 larry curly moe > stooges [Enter]