Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-28-2013, 11:47 AM   #1
Senior Member
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
Empty directory taking up space

So when you clear out a directory that contained a lot of files, or was frequently used, it seems that the . inside of it doesn't go back to 4k in size most empty folders show as, it's in the hundreds of kb's range. Why is that? Not a big deal but i'm just curious, is it logging something from files that were previously in there?

ll -ah
total 360K
drwxrwx--- 2 txt text 352K Aug 28 06:46 .
drwxrwx--- 9 txt text 4.0K May 24 2011 ..
Old 08-28-2013, 05:18 PM   #2
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,271

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
This is size of metadata for this directory. It is not deallocated after removing directory entries (ex. files), due too many work to do for this and very small amount of data wasted, it is just not necessary (writing to disk cost, so also data of removed files is not overwritten but only few bytes of it metadata). Anyway it will be used again when you create new entries or removed if you delete directory.
Old 08-28-2013, 05:24 PM   #3
Senior Member
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Thanks. I was just curious at which point it would free that space, or why it held on to it. thanks.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is taking up space on / partition CHIadam Linux - Newbie 8 06-07-2012 05:13 PM
What is taking up all the space on sda6? Leirith Linux - Server 9 04-17-2012 03:54 PM
how to zero empty disk space alenD Linux - Hardware 7 12-21-2007 04:14 PM
Does empty directory occupy space?? rs_vijay Programming 4 12-16-2006 07:50 PM
dd empty space question ygloo Linux - Software 15 09-22-2006 01:24 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration