Skip to content

Instantly share code, notes, and snippets.

@pdebski
Last active January 13, 2018 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdebski/2ad9fa7897fb42f7464ef5b06d046c98 to your computer and use it in GitHub Desktop.
Save pdebski/2ad9fa7897fb42f7464ef5b06d046c98 to your computer and use it in GitHub Desktop.
UNIX Linux
$ find . -type f -print -exec cmp \{\} /media/pdebski/MEDIA/\{\} \;
$ find . -type f -print -exec echo \{\} \;
@pdebski
Copy link
Author

pdebski commented Jan 6, 2018

Compare with find and cmp:

If files differ:
./alien.txt
./alien.txt /media/pdebski/MEDIA/alien.txt differ: byte 8, line 2

If a file on MEDIA is missing:
cmp: /media/pdebski/MEDIA/Alien.avi: No such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment