3 ms·
As you already use GNU diff's `-N` then you can pass any non existing as the first directory: diff -urN /dev/null-non-existing-dir dir1 > x.diff Or use `m
by imhoguy 6y ago
As you already use GNU diff's `-N` then you can pass any non existing as the first directory:
diff -urN /dev/null-non-existing-dir dir1 > x.diff
Or use `mktemp -d`. It is still cheaper than investing into some niche tooling without groundbreaking capabilities.
- johntash 6y agoThanks! I didn't realize you could pass in a non-existent directory, that makes it an easier trick.