LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Deleted files question (https://www.linuxquestions.org/questions/linux-newbie-8/deleted-files-question-770443/)

schulte3 11-20-2009 09:08 AM

Deleted files question
 
I recently reformatted my external to fat32 from ntfs and backed up the contents of it onto my laptop's hard drive (around 130 GB). After re-formatting I moved the files back to my external and deleted the files off my laptop but it still says I only have about 33 GB of free space when I had around 160 GB or free space before backing up my external's data.

I'm using Ubuntu 9.10, is there any "recycle bin" type of thing which I can empty?

Komakino 11-20-2009 09:15 AM

Yes. Have a look in .Trash (hidden folder, hence the .)

schulte3 11-20-2009 09:41 AM

That folder isn't present in my home directory. (I'm using Ubuntu 9.10)

thorkelljarl 11-20-2009 09:45 AM

Hidden...

Have you enabled Hidden Files? Look in your File manage(mine is Dolphin) under File for Show Hidden files.

Komakino 11-20-2009 09:47 AM

Quote:

Originally Posted by schulte3 (Post 3764005)
That folder isn't present in my home directory. (I'm using Ubuntu 9.10)

So am I and I've got one, though I'm not at home right now so I can't check the details.

It's definitely not there if you do
Code:

ls -a
?

schulte3 11-20-2009 10:28 AM

Yeah, ls -a doesn't show it.

When I right click on my filesystem and check its properties it says there is only 44.7 GB of files with 34 GB of free space even though it's a 220 GB partition.

malekmustaq 11-20-2009 11:08 AM

schulte3,

Here is the philosophy behind:
When we delete (normal remove) the file goes or is moved to the trash (recycle bin) it is not yet destroyed, therefore the disk space is not freed.

To regain the space you must completely delete the file. Under Linux, usually it is enough to do any of the following:

a) By Terminal: cd to /home/username. If 'ls -a' does not show the 'Trash' folder it is because the system holds it inside the '.local' (dot, local) folder. So you must issue command: 'cd ./.local' (note my two dots) then issue again 'ls -a', if 'Trash' is not listed there should be a folder named 'share'; cd into that, 'cd ./share' (only one dot), 'ls -a' again. This time 'Trash' folder should be there. If you wanted to delete completely its contents (it will refuse deletion of some files owned by separate username) then you must first own everything inside. Do this:

schulte3@host--$ chown schulte3:schulte3 -R ./Trash [assuming 'schulte3' is your username] Then you can now issue removal of files.

schulte3@host--$ rm -fR ./Trash/* [or if you are inside Trash folder, do this--]

schulte3@host ~/.local/share/Trash --$ rm -fR *

b) By Dolphin (File Manager): Goto View, set 'Show Hidden Files' On, then browse into the Trash folder as described above, right click and Delete. Again if permissions complain you will need to 'chown' everything first, for this purpose you can do as described above by opening a terminal in the folder.

Note: If you have deleted it running as 'root' your home folder should be at /root, there you can execute the same procedure.

In some distros there is a universal 'Trash' folder listed in the root (/) directory, try examine your root directory: 'ls -a /' see if you find one.

Check back how you fared.

Hope it helps.

Good luck.

Erik_FL 11-20-2009 11:44 AM

If nothing else makes sense you might also want to check the Linux file system for errors. If you recently had any problems causing a sudden reboot then you might have some orphaned files or free space that aren't being included in the available / allocated space. I'm assuming that your free space problem is on the Linux file system and not the external drive. You didn't say exactly.

schulte3 11-20-2009 12:23 PM

Thank you malekmustaq, it was in my .local/share directory.

Komakino 11-20-2009 12:24 PM

Ah, I'm home now and what malekmustag said is right, your trash folder is in:

.local/share/Trash/

under your home folder.


All times are GMT -5. The time now is 06:22 AM.