|
On Mon, 24 Jan 2005, Steve Landess wrote:
In your case, the "allocated" size is probably the _minimum_ amount of storage than can be allocated for the IFS object...it is probably the "cluster size" on the disk, or the minimum number of sectors that must be allocated for an IFS object.
This phenomenon can also be observed on any PC hard disk...open a text editor, put a single character into a text document, and save it to disk...then go back and see how much storage it occupies.
As a test, I just used Notepad to create a text file named XXX.TXT, and put a single 'A' into it.
when I use DIR to view the files in the folder, it shows a size of 5. However, when I use Explorer to view the properties of the file, it says that 4096 bytes are allocated, so on my PC the cluster size is probably 4096 bytes.
cat > onebyte a<control-C>
james@stumpy:~> ls -l onebyte -rw-r--r-- 1 james users 1 Jan 24 13:44 onebyte
This shows a size of 1. But adding the -s argument to ls gives:
james@stumpy:~> ls -ls onebyte 4 -rw-r--r-- 1 james users 1 Jan 24 13:44 onebyte
which shows that the file occupies 4 1024-byte blocks.
James Rich
It's not the software that's free; it's you. - billyskank on Groklaw
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.