Closed evgeni closed 10 years ago
From man diff:
man diff
-N, --new-file treat absent files as empty
Example:
% mkdir /tmp/foo/a /tmp/foo/b % echo bar > /tmp/foo/a/foo % diff -Nrwu /tmp/foo/a /tmp/foo/b diff -Nrwu /tmp/foo/a /tmp/foo/b --- /tmp/foo/a 2014-02-05 08:25:12.861979159 +0100 +++ /tmp/foo/b 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -r bar % diff -rwu /tmp/foo/a /tmp/foo/b Only in /tmp/foo/a: foo
Works also for files that are only in b, obviously.
b
From
man diff
:Example:
Works also for files that are only in
b
, obviously.