Deleted files - free space hasn't returned?

Associate
Joined
20 Oct 2004
Posts
1,485
Hello all

I'm afraid I'm entirely new to Linux so please bare with me if this question is horribly noobish. I recently bought an Asus EEE PC that had an 8GB SSD - think it's the 701. The operating system is Linux easypeasy edition.

I only purchased the system to have a portable music player whilst on holiday so I'm now selling it as I no longer need it. The question I have relates to the space available on the HDD. At various points I transferred files to the "Desktop" location which were then subsequently deleted. However, it seems that despite deleting the files, the PC doesn't recognise any additional free space. I'm now down to about 1GB of space left so would like to know how to free up the space that should be there?

Thanks
 
Soldato
Joined
8 Mar 2006
Posts
13,300
Location
Near Winchester
Yes, either you moved them to the trash when you deleted them, or you only ever made symlinks to the files real location in the 1st place.

Also might be worth doing a:
Code:
du /home | sort -g

This will show every file and directory you made in order of size.
 
Associate
Joined
30 Aug 2011
Posts
8
Try checking "lsof | grep deleted" as per Skiba's comment, as a program might still be holding onto the data. Or you could run "lsof | grep /tmp". Since you don't need the drive I recommend zero wiping the drive several times to ensure no one can get back to a previous deleted data. To do this run:

dd if=/dev/zero of=/dev/hda bs=1M

Make sure you've booted either from a Live CD or from another HDD that's running Ubuntu. All data will be zero'd and lost. Oh and of course, make sure you change "/dev/hda" to the actual drive that you want wiped :p
 
Associate
OP
Joined
20 Oct 2004
Posts
1,485
Thanks for the advice - unfortunately neither emptying the trash or the command to make programmes let go of the data seem to have solved the issue.

Ideally I'd rather not format as I've sold it as having the operating system on and although I've got the CDs still I've never installed this type of OS before and clearly have no idea what I'm doing!

May have to go for that though as a last resort. Or maybe I could just learn how to use Linux...
 
Back
Top Bottom