Deleted files not increasing available free space on Ubuntu (as reported by df -h)
- by Homunculus Reticulli
I am writing data munging scripts (python and bash), to munge data and import large quantities of text files into a database.
I am currently in the test phase, so I am generating several K's of files and deleting them (the files consume about 20G of space). After a test run, I delete the files (sometimes without having imported into the database).
I notice that there is a steady decrease in the amount of free space on my disk (as reported by df -h). I don't understand this, as I use rm * (in the data directory), and in the cases where I use Nautilus, I empty the Trash bin as well.
Similarly, I notice that when I import the data into the (postgresql) database, and then delete the data from the tables using DELETE FROM tablename;, the size consumed in the postgresql data directory does not go down either.
Currently, I have lost approximately 200G from hard drive, and I need to reclaim that - but don't know what to do to reclaim it - any ideas?.
I am running Ubuntu 10.0.4 LTS + postgresql 8.4