Can you diff all files in one directory?

Using the standard cksum utility along with awk:

find . -type f -exec cksum {} + | awk '!ck[$1$2]++ { print $3 }'

The cksum utility will output three columns for each file in the current directory. The first is a checksum, the second is a file size, and the third is a filename.

The awk program will create an array, ck, keyed on the checksum and size. If the key does not already exist, the filename is printed.

This means that you get the filenames in the current directory that have unique checksums + size. If you get more than one filename, then these two have different checksums and/or size.

Testing:

$ ls -l
total 8
-rw-r--r--  1 kk  kk  0 Oct  3 16:32 file1
-rw-r--r--  1 kk  kk  0 Oct  3 16:32 file2
-rw-r--r--  1 kk  kk  6 Oct  3 16:32 file3
-rw-r--r--  1 kk  kk  0 Oct  3 16:32 file4
-rw-r--r--  1 kk  kk  6 Oct  3 16:34 file5

$ find . -type f -exec cksum {} + | awk '!ck[$1$2]++ { print $3 }'
./file1
./file3

The files file1, file2 and file4 are all empty, but file3 and file5 have some content. The command shows that there are two sets of files: Those that are the same as file1 and those that are the same as file3.

We may also see exactly what files are the same:

$ find . -type f -exec cksum {} + | awk '{ ck[$1$2] = ck[$1$2] ? ck[$1$2] OFS $3 : $3 } END { for (i in ck) print ck[i] }'
./file3 ./file5
./file1 ./file2 ./file4

If you don't need to compare them, and only need to know if they differ, you can just diff every file in the directory with any one of the files in the directory via a for-loop...

for i in ./*; do diff -q "$i" known-file; done

...where known-file is just any given file in the directory. If you get no output, none of the files differ; else you'll get a list of the files that differ from known-file.