Skip to main content
added 528 characters in body
Source Link
jave.web
  • 162
  • 1
  • 9

Usually I like to use a following diff command setup to recursively compare 2 directory structures:

diff --brief --recursive dir/one dir/two

However on my last attempt it returned nothing, so I thought, hey that's good, but then I've opened properties of each of those folders:

  • same number of files 6496 items
  • the sizes were almost the same, but just almost 1 has 660,5MB but the other one has 660,7MB - 200KB difference

And since this is in a process for data import purposes I need to know:

  • How can this happen?
  • Does diff also compare contents? Or is it optional? (if so, how can one enforce that?) Could not find more info in docs.

Additional important info:

  • Both folders have the same data source but different tool was used to extract them

  • Both folders have the same parent directory

  • OS is Ubuntu 20.04.2 LTS

  • Filesystem where they're stored is Ext4(Version 1.0) on an SSD disk

  • GUI tool for folder properties was used Nautilus - Gnome's "Files" version 3.36.3-stable

EDIT: During solving this Q I've created a little Python3 script, that just blindly counts all files(not folders) and their total size count in bytes for all directories you will send to it
1. save this code: https://ideone.com/4pu1qs as quick_dir_compare.py
2. use as python3 quick_dir_compare.py dirpath1 dirpath2 .....
2.x if you don't have python3: sudo apt install python3 before 2.
license: I grant free for all legal and human-rights purposes

Usually I like to use a following diff command setup to recursively compare 2 directory structures:

diff --brief --recursive dir/one dir/two

However on my last attempt it returned nothing, so I thought, hey that's good, but then I've opened properties of each of those folders:

  • same number of files 6496 items
  • the sizes were almost the same, but just almost 1 has 660,5MB but the other one has 660,7MB - 200KB difference

And since this is in a process for data import purposes I need to know:

  • How can this happen?
  • Does diff also compare contents? Or is it optional? (if so, how can one enforce that?) Could not find more info in docs.

Additional important info:

  • Both folders have the same data source but different tool was used to extract them

  • Both folders have the same parent directory

  • OS is Ubuntu 20.04.2 LTS

  • Filesystem where they're stored is Ext4(Version 1.0) on an SSD disk

  • GUI tool for folder properties was used Nautilus - Gnome's "Files" version 3.36.3-stable

Usually I like to use a following diff command setup to recursively compare 2 directory structures:

diff --brief --recursive dir/one dir/two

However on my last attempt it returned nothing, so I thought, hey that's good, but then I've opened properties of each of those folders:

  • same number of files 6496 items
  • the sizes were almost the same, but just almost 1 has 660,5MB but the other one has 660,7MB - 200KB difference

And since this is in a process for data import purposes I need to know:

  • How can this happen?
  • Does diff also compare contents? Or is it optional? (if so, how can one enforce that?) Could not find more info in docs.

Additional important info:

  • Both folders have the same data source but different tool was used to extract them

  • Both folders have the same parent directory

  • OS is Ubuntu 20.04.2 LTS

  • Filesystem where they're stored is Ext4(Version 1.0) on an SSD disk

  • GUI tool for folder properties was used Nautilus - Gnome's "Files" version 3.36.3-stable

EDIT: During solving this Q I've created a little Python3 script, that just blindly counts all files(not folders) and their total size count in bytes for all directories you will send to it
1. save this code: https://ideone.com/4pu1qs as quick_dir_compare.py
2. use as python3 quick_dir_compare.py dirpath1 dirpath2 .....
2.x if you don't have python3: sudo apt install python3 before 2.
license: I grant free for all legal and human-rights purposes

Source Link
jave.web
  • 162
  • 1
  • 9

diff doesn't return anything, but total size is different?

Usually I like to use a following diff command setup to recursively compare 2 directory structures:

diff --brief --recursive dir/one dir/two

However on my last attempt it returned nothing, so I thought, hey that's good, but then I've opened properties of each of those folders:

  • same number of files 6496 items
  • the sizes were almost the same, but just almost 1 has 660,5MB but the other one has 660,7MB - 200KB difference

And since this is in a process for data import purposes I need to know:

  • How can this happen?
  • Does diff also compare contents? Or is it optional? (if so, how can one enforce that?) Could not find more info in docs.

Additional important info:

  • Both folders have the same data source but different tool was used to extract them

  • Both folders have the same parent directory

  • OS is Ubuntu 20.04.2 LTS

  • Filesystem where they're stored is Ext4(Version 1.0) on an SSD disk

  • GUI tool for folder properties was used Nautilus - Gnome's "Files" version 3.36.3-stable