This is an old revision of the document!
$ diff /usr/share /usr/local/share
$ diff /usr/bin/test /usr/bin/[ или $ diff /bin/test /bin/[ $ ls -i /usr/bin/test /usr/bin/[ или $ ls -i /bin/test /bin/[
$ cat hello.c
#include <stdio.h>
main () {
printf("Hello World\n");
}
$ cp hello.c hello.c.old $ cat hello.c
#include <stdio.h>
main () {
printf("Hello World Again\n");
}
$ diff hello.c.old hello.c
3c3
< printf("Hello World\n");
---
> printf("Hello World Again\n");
diff -e hello.c.old hello.c
3c
printf("Hello World Again\n");
.
$ diff hello.c.old hello.c > hello.patch $ mv hello.c.old hello.c $ patch hello.c hello.patch $ cat hello.c
#include <stdio.h>
main () {
printf("Hello World Again\n");
}