Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
* * * * * 1 votes

What Is The Difference Between "size" And "size On Disk"?


4 replies to this topic

#1 cyber_electrons

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 190 posts

Posted 21 March 2009 - 12:36 PM

For example, I have some files. I check their properties for their size. I need to report their size when I hand those files in. Do I use the "size" or the "size on disk" if I want to make sure that the size that I report is the same as the size of the files? I will be transferring files from HDD to USB to another HDD then to a CD.

I understand that different storage medium will vary the size but I need to know what is the actual size of the files - may be excluding the information that the storage device uses to mark the location of files.

If you can tell me, that's great. I also know that I might not be very clear on what I have said (I am in a hurry now - time of post), but if more information is necessary, please inform me.

Thanks.

#2 Quatrux

    Privileged Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 605 posts
  • Gender:Male
  • Location:Lithuania, Vilnius
  • Interests:Programming
  • myCENT:49.19

Posted 21 March 2009 - 01:01 PM

size is the real size of file in bytes, like if you have a text file with 3 ANSI letters, it will use 3 bytes and it's size will be 3 bytes, but size on disk is different, it's the size that file takes being stored on that HDD, so size on disk usually depends on the Hard disk drive, on the file system used FAT, NTFS, SFS, FFS and etc.

Imagine a hard drive made from blocks/clusters with it's own sizes, so 3 bytes will take up lets say ~4.00 KB on your Hard drive, the more small files, the more it takes space on your drive and it all depends on the file system you're using.. Bigger files will usually take the same space.. Also imagine, you have C:/ partition on Windows, you checked the check-box to compress your files on that partition to save some space, so a text file having size 280 KB will be compressed on your hard drive and will take about 79 KB on disk, less than the original one, as it's compressed, but you don't even feel that as everything is very fast, you think it's a simple text file.

To determine the real space, I usually suggest to .TAR or .ZIP (without compression or at least fastest method) lots of small files and only then put it on your USB key to transfer, you'll know for sure, as usually NTFS is used on HDD and on USB Keys it's only FAT32 ;]

#3 pasten

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 119 posts
  • Gender:Male
  • Location:In front of my monitor.
  • myCENT:34.77

Posted 21 March 2009 - 01:06 PM

"Size" is the actual value, you need to report that as the actual size of the files. "Size on disk" is the value after including fragmentation space and cluster size (set when formatting a drive). Fragmentation is the cluttered distribution of the files into different clusters and hence it takes into account the full cluster size even if there is only 2 kb of data on a 4kb cluster, for example. Since you are ultimately transferring it to a cd, you just make sure that the actual "Size" is less than 700mb (may be a bit more if you would like to overburn).

#4 cyber_electrons

    Premium Member

  • Kontributors
  • PipPipPipPipPipPipPipPip
  • 190 posts

Posted 23 March 2009 - 09:38 AM

Thanks guys.

I was wondering if you can help me clear this issue. It is in this topic:

http://www.trap17.com/forums/Mb-Mib-Issue-...ion-t65041.html

About binary etc...

Edited by cyber_electrons, 23 March 2009 - 09:43 AM.


#5 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 15 January 2010 - 09:04 AM

why does the size of a file is showing to smaller that the size occupied by the file on disk.What Is The Difference Between "size" And "size On Disk"?

Dear All,

I have an Idea about file system and also I understand that why the size on disk is generally showing greater that the file size.

But my question is: recently I experienced a good thing that the size on disk is showing to larger that the size of the file. 

Like:

Size: 63.1 MB (66,245,775 bytes)

Size on disk: 213 MB (224,321,536 bytes)

& one more file on the same PC is showing like:

Size : 261 MB (274,008,198 bytes)

Size on disk : 887 MB (930,238,464 bytes)

-question by kuku




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users