I have two folders with 200 txt files each, all files named like file1.txt, file2.txt, file3.txt, etc., on both folders.

Is there a way to use one command to compare file1 in both folders, file2 in both folders, etc., and list if they are the same or not? I just want to know which files are the same or not, not the differences.

1 Answer 1


The -q option to diff makes it only list the names of files with differences (or missing from one of the directories):

diff -q folder1 folder2
  • simply P E R F E C T!!!!!!
    – Duck
    May 23, 2015 at 13:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .