Skip to main content
Became Hot Network Question
added 168 characters in body
Source Link
Estatistics
  • 360
  • 1
  • 4
  • 16

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".

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/{}" \; 

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".

Minor formatting, re-tag
Source Link
AdminBee
  • 23.6k
  • 25
  • 56
  • 77

How to find missing directories between two disk structures?

  • Lets say Disk A has dir AA/, BB/, CC/, DD/. (newer copy)
  • Lets say Disk B has dir AA/, BB/, DD/, EE/. (older copy)

I want to find which directories are missing from newer copy in compared to the older copy. Results

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/{}" \; 

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/{}" \; 

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/{}" \; 
Source Link
Estatistics
  • 360
  • 1
  • 4
  • 16

How to find missing directories between two disk structures?

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/{}" \;