LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-28-2013, 10:47 AM   #1
anon091
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, 04:18 PM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
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, 04:24 PM   #3
anon091
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.
 
  


Reply



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 04:13 PM
What is taking up all the space on sda6? Leirith Linux - Server 9 04-17-2012 02:54 PM
how to zero empty disk space alenD Linux - Hardware 7 12-21-2007 03:14 PM
Does empty directory occupy space?? rs_vijay Programming 4 12-16-2006 06:50 PM
dd empty space question ygloo Linux - Software 15 09-22-2006 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:19 PM.

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