How to find missing directories between two disk structures?
- Lets say Disk A has dir
A/
,B/
,C/
,D/
. (newer copy) - Lets say Disk B has dir
A/
,B/
,D/
,E/
. (older copy)
I want to find which directories are missing from newer copy in compared to the older copy.
Results: "Dir E".
How I can do this? I dont want any report on files.
This can create only the missing directories from a specific target:
find -type d -exec mkdir -p "/mnt/pics/Albums/{}" \;
UPDATE: The suggested article in my question was about content and not folders. Also, it was not presented a clear solution as the answer of "diff -rq path1 path2".
rsync
if you use --dry-run option, it will create a list. – D'Arcy Nader Oct 25 '23 at 13:38