Folder alpha
has one subfolder, and files in both root and in subfolder.
Folder beta
has 25 subfolders with files in them.
How would I compare the file contents of alpha
and beta
, checking for difference in files?
Folder alpha
has one subfolder, and files in both root and in subfolder.
Folder beta
has 25 subfolders with files in them.
How would I compare the file contents of alpha
and beta
, checking for difference in files?
Assuming the file and directory names don't have newlines in them:
diff <(cd alpha ; find . -type f) <(cd beta; find . -type f)
The find
commands list the files in the directories the cd
changed to and the diff
compares the listings. Output looks like:
1c1,2
< ./b/c/file.x
---
> ./b/c/file.d
> ./b/c/file.e
with <
indicating files only in alpha and >
only in beta
diff
? – jimmij Oct 11 '14 at 20:12