Today I "found" a HDD in one of my systems that I completely forgot I had. So I wanted to look inside and see what was in there. I logged in via ssh from another computer (may be important for the following) and, after quite a bit of fiddling around(*), I managed to mount it and inspect it. It had about 65G of data in it. I copied all what I wanted to preserve and then rm -rf
ed the rest.
Now df
tells me that it has a total of 917G, 206M are used and 870G are available. I thought, maybe the files I deleted are not really deleted but moved to a recycle bin. But that wouldn't add up with the shown numbers. I still inspected '$RECYCLE.BIN'
and lost+found
, but only in '$RECYCLE.BIN'
there is a 129 Byte (!!) long .ini file completely unimportant. But I want to make sure there's nothing else important in there before I format it.
Here the questions: does rm
move files to a recycle bin or does it delete them right away (as I had understood so far)? And if it does move them to a recycle bin, which one does it use when one is connected via ssh?
Where else could I look to see what's taking up that space that df
can't see?
(*) just a funny (to me) anecdote: at first I mounted the drive, but ls
saw it as empty. So I looked with parted
if I could see anything: the drive had a msdos partition table and it only had partition #2 in it, which was taking up the whole disk. I went ahead and deleted the partition, recreated a partition table as gpt and created a new primary partition as ext4 taking up the whole disk. I mounted it again and, SURPRISE... the disk was no longer empty! I could see a directory, which I then remembered were there to start with, but ls
couldn't see before I redid the partition. So parted
warned me several times that all my data would be lost, but it didn't happen. To the contrary I recovered data. Puzzling.