LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-15-2022, 12:05 PM   #1
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,634

Rep: Reputation: Disabled
rsync creates destination directories smaller than the source directories. Why?


I built a new PC. Now I'm moving over my data from the old PC's /home/{me}, in particular my pictures. I noticed a slight reduction in the size of the destination directories as compared to the source directories (e.g. 999.678.662 vs. 999.709.360 bytes). Both file systems are ext4. The files of the pictures have the same size in source and destination. What happens here?
 
Old 01-15-2022, 02:39 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,741

Rep: Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745
Quote:
Originally Posted by JZL240I-U View Post
I built a new PC. Now I'm moving over my data from the old PC's /home/{me}, in particular my pictures. I noticed a slight reduction in the size of the destination directories as compared to the source directories (e.g. 999.678.662 vs. 999.709.360 bytes). Both file systems are ext4. The files of the pictures have the same size in source and destination. What happens here?
#1 what are you using to report the size of the directories? How are you getting the sizes of the files?
#2 What are the file system characteristics on BOTH sides, do they match?
#3 Is this observation only about the image files, or are text and other files also affected?
 
Old 01-15-2022, 02:58 PM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Probably some of the directory files themselves are using less space. An ext4 directory file grows as more files are added, but does not shrink when files are removed. A directory which once contained a large number of files, but now contains fewer, remains at its larger size. When you copy that directory and its contents, the directory at the destination will only be large enough (rounded up to a block size) to contain the current number of file names with their inode numbers and types.
 
Old 01-16-2022, 08:44 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,634

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wpeckham View Post
#1 what are you using to report the size of the directories? How are you getting the sizes of the files?
#2 What are the file system characteristics on BOTH sides, do they match?
#3 Is this observation only about the image files, or are text and other files also affected?
1# I used dolphin on each machine and via SFTP from the new one. For single files I used also "ls".

2# Both are ext4, they should match exactly being created by the SUSE install process.

3# There are only images there.

Thanks for your input .


@rknichols Thank you. That explains it and I'm relieved . Marking this thread as solved.

Last edited by JZL240I-U; 01-16-2022 at 08:46 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] more data on destination than source after rsync replica9000 Linux - Software 5 11-30-2016 05:46 PM
rsync question. destination larger than source dimitrio Linux - Server 7 11-18-2013 04:17 AM
[SOLVED] match source pattern in destination and substitute in destination usin AWK 123raajesh Linux - Software 7 11-13-2013 04:22 AM
CP Question RE: Checking if file is smaller than destination jsteel Linux - Software 3 10-22-2009 07:37 PM
LXer: Piracy creates jobs, FOSS creates opportunities LXer Syndicated Linux News 0 11-02-2006 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration