Link to home
Start Free TrialLog in
Avatar of poisa
poisaFlag for Canada

asked on

what does this ls output mean?

Look at this listing of my /var/spool dir

drwxr-xr-x    8 root     root         4.0k Aug 27 01:29 .
drwxr-xr-x   20 root     root         4.0k Feb 11 23:32 ..
drwxr-xr-x    2 root     root         4.0k Feb  2 16:43 cron
drwxrwxrwt    2 root     mail         4.0k Feb 16 00:10 mail
drwxrwxrwx    2 root     root         4.0k Feb  1 07:45 monstd
drwxr-xr-x    2 root     mail         1.9M Feb 16 12:28 mqueue
drwxr-xr-x    2 root     root         4.0k May 13  2004 up2date
drwxr-xr-x    2 root     root         4.0k May 13  2004 uucp

Why is it that mqueue/ shows as using 1.9M instead of 4.0k? (the mqueue/ dir was empty when I created this listing)
Avatar of rajendraone
rajendraone
Flag of United States of America image

May be the space was imposed to handle the mail queue. Just try if you can add up some files inside it and check the listing again if it increases the space.
I guess its something managed by mail daemon for the queuing up the mails.
Please comment if its something different.

Rajendra.
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of robot3367
robot3367

In UNIX (and  LINUX) directories never shrink. If you do an ls -l of / you will see that lost+found is always large. (This is so that  unlinked files can be linked into here when fixing a file system in circumstances when it would not be possible to add extra blocks to the directory itself. )
Delete and recreate the directory if you are really worried about its size but dynamic directories will only expand next time they have too many entries to hold in a single block. It is rarely a problem.
Avatar of poisa

ASKER

I had no idea about all of this...

There's one thing I don't understand though... does this mean that the space is actually occupied, or that it is "reported" as occupied?

Thanks for the info!
The space is allocated to that directory node and thus isn't available for other use, but if /var/spool/mqueue is empty or nearly so the space isn't actually being used.
Avatar of poisa

ASKER

Oh, I see... very interesting...