Hi,
Precisely speaking, directory is a kind of file in ext2/3 filesystem and its size is a muliple of block size. Default block size is usually 4096. So, you see the size of most of small directories as 4096 by ls command.
If you have large direcories including many files and directories its size, shown by ls command, can be 8192 (2 * 4096) or even more. This doesn't relate to sum of files size contained in a directory.
Regards,
Precisely speaking, directory is a kind of file in ext2/3 filesystem and its size is a muliple of block size. Default block size is usually 4096. So, you see the size of most of small directories as 4096 by ls command.
If you have large direcories including many files and directories its size, shown by ls command, can be 8192 (2 * 4096) or even more. This doesn't relate to sum of files size contained in a directory.
Regards,
----- Original Message ----
From: parag shrivastava <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, October 4, 2006 10:45:28 PM
Subject: Re: [dubailug] Actual size of folder
Hi,
Akshay Lamba <[EMAIL PROTECTED] com> wrote:
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
From: parag shrivastava <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, October 4, 2006 10:45:28 PM
Subject: Re: [dubailug] Actual size of folder
Hi,
Kindly apply this command
# du -h folder
This command will show u the actually size of the folder including sub folders and files also...
If u are applying this command.....
# du -H folder
This will also show the size of the folder but it will be higer then the previous result ....the reasuon is it taks 1 kb = 1000 byts but when u put "-h " then it takes as 1 kb = 1024 bytes......
# ls -al
This command can show only the size of files not the directory... ..For directory it always takes as 4096....either folder contains files or sub directory... ..
Akshay Lamba <[EMAIL PROTECTED] com> wrote:
Here's a weird one...when I do a "ls -al" on any directory... it shows me
the file sizes of the actual files and the file size for any folder as
4096. While I'll ask google the why rather than trouble someone
here...what would be the command to see the "actual" file size of the
folders (i.e. the size of the folder and sum of sizes of all
folders/files in it).
TIA.
A
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
__._,_.___
SPONSORED LINKS
| Linux operating system | Linux os | Hosting linux unix web |
| Unix vs linux |
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
