I'm trying to compare a folder with 1400 subfolders to one with a 1.399. I need to know which subfolder is missing.
I tried this:
diff -rq dir1/ dir2/ | grep dir1/ | awk '{print $4}' > difference1.txt
But it's been like 6 hours yet and no output. ls
in the folders is nearly instant so is there a faster approach than diff?
Best Answer
This will make sure
diff
does not look inside the subdirs.Or try this if you are brave ;)