LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-01-2012, 01:06 AM   #1
maxpolaris
LQ Newbie
 
Registered: Jul 2011
Posts: 5
Blog Entries: 1

Rep: Reputation: Disabled
Question file size differences on 2 ext 4 files systems


I copied files from an ext4 filesystem on a local usb HD to an ext4 NAS HD.
ls -s reports different sizes.
example diff file output
total 4737532 | total 4885589
110216 Ministry of Sound - Trance Nation 4 - CD 2.mp3 | 110213 Ministry of Sound - Trance Nation 4 - CD 2.mp3
110212 Ferry Corsten - Trance Nation 2001 CD2.mp3 | 110211 Ferry Corsten - Trance Nation 2001 CD2.mp3
103840 Ferry Corsten - Global Transmissions.mp3 103840 Ferry Corsten - Global Transmissions.mp3

Does anyone have any ideas why file sizes reported by ls -s would differ on 2 ext4 file systems?
 
Old 12-01-2012, 02:18 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by maxpolaris View Post
I copied files from an ext4 filesystem on a local usb HD to an ext4 NAS HD.
ls -s reports different sizes.
example diff file output
total 4737532 | total 4885589
110216 Ministry of Sound - Trance Nation 4 - CD 2.mp3 | 110213 Ministry of Sound - Trance Nation 4 - CD 2.mp3
110212 Ferry Corsten - Trance Nation 2001 CD2.mp3 | 110211 Ferry Corsten - Trance Nation 2001 CD2.mp3
103840 Ferry Corsten - Global Transmissions.mp3 103840 Ferry Corsten - Global Transmissions.mp3

Does anyone have any ideas why file sizes reported by ls -s would differ on 2 ext4 file systems?
The s option shows the amount of blocks needed to store a file, not the real size, which is shown by the S option.

Without knowing what the block size is that is being used by either filesystem we/you cannot say if the output is correct.

The following might give you an insight:
Code:
do this on the same file on both filesystems
$ stat "Ministry of Sound - Trance Nation 4 - CD 2.mp3"
The fist line shows the actual size, amount of blocks used and the block size.
 
  


Reply

Tags
difference, ext4, file size, nas, usb disk


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NTFS vs Ext File Systems Ken Ju-On Linux - General 15 05-24-2009 11:47 PM
difference:: ext/ufs file systems anwerreyaz General 1 07-12-2006 11:40 PM
Is arrangement of file systems will differ if we copy a file from FAT 32 to ext 3 ? anindyanuri Linux - Software 2 02-20-2005 11:39 AM
differences between file systems nakkaya Linux - Hardware 1 03-13-2003 04:32 PM


All times are GMT -5. The time now is 10:43 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration