Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Size of a directory ?

Posted on 1998-07-29
1
Medium Priority
?
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
mlev earned 150 total points
ID: 1637666
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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.
Suggested Courses

660 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