diff has an option
-r) to do a comparison between two directories (the files inside them). Is there a way to make
diff ignore all socket files and only socket files?
I am using
diff --brief -r --no-dereference /var/ /media/mateusz/Database/tmp/duplicity_unpack/var/ to verify part of my backup and I am flooded by entries like
Only in /var/lib/samba/private/msg.sock: 10001. These files are socket files that Duplicity failed to backup - and it is not indicating a failed backup.
I am aware that I may write my own processing of output but it has potential for bugs, requires more time and requires me to maintain list of socket files in the filesystem.
Note that empty folders should not be ignored in the comparison.