Linux difference between two directories

This command will find the different files between two directories in linux:

diff --brief -r folder1 folder2 > /tmp/difference.txt

You can then view all the files which are missing from one folder by doing a grep on the difference file e.g.

grep -irsn "Only in folder2" /tmp/difference.txt > /tmp/only-in-folder2.txt

Recent Posts
Search By Tags

Certified Development

We design, build, develop, manage, advise and host Laravel and Magento

Ecomus logo

London, Brighton and the UK

©2008 - 2020 Ecomus Ltd.  All Rights Reserved