Solved

Size of a directory ?

Posted on 1998-07-29
1
219 Views
Last Modified: 2010-04-20
Hi ,
    I have seen that when we do an ls in a directory containing subdirectories we find that the size of a directory is 512 bytes irrespective of the directory being empty or not. But in the linux system that I have installed in my system each directory shows to occupr 32kb space. I have installed linux on a primary Dos partition i.e mine is a UMSDos kind of installation. Can anybody help me solve this ?
Thanks
Harsha
0
Comment
Question by:harsha_n_s
1 Comment
 
LVL 2

Accepted Solution

by:
mlev earned 50 total points
Comment Utility
The size of a directory as shown in ls -l is the total size of blocks it occupies on the disk, thus the minimum size is the size of a single block. It depends on the filesystem you use. Some Unix installations use filesystems with block size of 512, that's what you probably saw (but that doesn't mean the size is ALWAYS 512; if you put more files in the directory, it will grow to 1024, then to 1536 etc.) Linux standard filesystem is ext2fs and it uses a default block size of 1024. Your filesystem is UMSDOS, built on top of FAT, and it uses the underlying FAT block size. Apparently, in your case it's 32K.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now