1

I'm trying to synchronize two folders from a remote computer. I want to use rsync to send the folder, and du to check if the space used is identical on the remote computer.

The problem is even with a rsync success the metadata is not same for folders. (folder with a lot of files inside)

du -sb FOLDER

Doesn't give me the same number on the remote computer.

bob dylan
  • 371
  • 2
  • 3
  • 9
  • 1
    `-b` will count the block sizes that depends on the file system layouts and position of free blocks to allocate new data..try just `du -s` or a more readable `du -sh` – heemayl Jun 16 '15 at 11:37
  • tried already, the problem is the same : 172008 on my computer, 171996 on the remote computer – bob dylan Jun 16 '15 at 11:42
  • Are the two computers using the same file system? We're talking about a difference of 8 bytes here, does it really matter? Just use `diff` to compare the folders instead. – terdon Jun 16 '15 at 12:00
  • both are ext4, how to use diff on a folder over ssh ? – bob dylan Jun 17 '15 at 01:55
  • I found two useful links: [Why do two directory hierarchies that are in sync have different sizes?](http://superuser.com/questions/442539/why-do-two-directory-hierarchies-that-are-in-sync-have-different-sizes) and [Does rsync verify files copied between two local drives?](http://unix.stackexchange.com/questions/30970/does-rsync-verify-files-copied-between-two-local-drives) – Lety Jun 17 '15 at 17:34

0 Answers0