pipuppy
Posts: 91
Joined: Fri Aug 24, 2012 12:51 pm

Hidden Wastebasket?

Fri Oct 28, 2016 3:58 pm

Hi,

I have been happily using my raspi-3 (currently running under Jessie) for about about a year now and aside from minor hickups all has gone well.

While I know all the scare stories and the "no-no's" about running as root I have found its sometimes quicker/easier to run PCManFM as root in order to avoid annoying messages about permissions when moving/copying user files around. It works for me only when I delete files in PCManFM running as root it asks "do you want to move the file zzz.zzz to the wastebin" and I answer "yes" it goes on to happily delete the file from the current directory but of course nothing appears in the desktop Wastebasket.

And heres the question...
This I would expect running as root but what happens to the files I delete in PCManFM when running as root? Do they simply get deleted or do they get moved to some hidden folder/directory? The reason I ask is because after deleting a number of files I expected to free-up around 800 m/byte of space and while the files seem to have gone I am not seeing the SD-Card space freed-up. I wonder if anyone could shed light on the issue?

Thanks for reading,

Regards,

Pipuppy

wh7qq
Posts: 1475
Joined: Thu Oct 09, 2014 2:50 am

Re: Hidden Wastebasket?

Fri Oct 28, 2016 9:24 pm

Interesting question. This one ran me around a bit before the answer came to me (I think).

I think your question can be answered by the fact that when you do pcmanfm as root, you are not in your home directory so things you delete do not show up there and the directory size may not reflect the change right away. If you look in the trash bin on your desktop, I think you will see the file or directory you removed there and so the overall sd card usage has not changed until you empty your trash. If as root, you delete a file/directory that you don't own, I have no idea where it goes. The disk usage may not show a change until you reboot.

I am not sure where the Trash directory actually lives...doesn't seem to show up anywhere. Root does not have a home directory in Raspbian unless you set one up for it, unlike some linux distros. It is sorta like it exists only as an elevation in priveledges but not as an account.

User avatar
Paeryn
Posts: 3056
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Hidden Wastebasket?

Sat Oct 29, 2016 1:16 am

Pcmanfm uses the standard location ~/.local/share/Trash/ to store files and their information prior to deleting (the file is moved in to Trash/files/ and an extra file is created in Trash/info/ for each file to say where the file came from so technically deleting to the wastebasket increases the amount of disk space used (at least until it is emptied)). Root's home directory is /root
She who travels light — forgot something.
Please note that my name doesn't start with the @ character so can people please stop writing it as if it does!

pipuppy
Posts: 91
Joined: Fri Aug 24, 2012 12:51 pm

Re: Hidden Wastebasket?

Sat Oct 29, 2016 10:41 am

Hi again and thanks to wh7qq & Paeryn for responding.

wh7qq is that a ham radio call or just a coincidence?? If it is your ham call then "hi from M0AYF" and thanks for your comments and feedback :-)

Paeryn, thankyou for the info on the location of the "Trash" directory when operating as a root user. I located the ~/.local/share/Trash/ dir and deleted the two bursting sub-dir's ("files" and "info") and instantly recovered over 1 G/byte of disk space.

I then re-created the "files" and "info" dir's under ~/.local/share/Trash/ and tested to make sure everything worked as before and it does. All ok now and I have learnt something new, great.

Thanks again to you both for taking the time to respond.

Regards,

pipuppy

wh7qq
Posts: 1475
Joined: Thu Oct 09, 2014 2:50 am

Re: Hidden Wastebasket?

Sat Oct 29, 2016 5:15 pm

Paeryn wrote:Pcmanfm uses the standard location ~/.local/share/Trash/ to store files and their information prior to deleting (the file is moved in to Trash/files/ and an extra file is created in Trash/info/ for each file to say where the file came from so technically deleting to the wastebasket increases the amount of disk space used (at least until it is emptied)). Root's home directory is /root
Interesting. Good that someone else chimed in on this Paeryn. I had not looked at all for /.local/... Good to know. Root's home dir. Of course, but there are only hidden directories and files there. Again, I had not looked that far.

Yes, the username is a ham radio call. Pretty inactive these days. The username is a holdover from years past.

Electorials
Posts: 1
Joined: Mon Dec 25, 2017 6:10 am

Re: Hidden Wastebasket?

Sat Feb 10, 2018 7:12 am

Hi there,

My wastebasket on my RPI3 isn't on my desktop either and I cannot find it. I am running the pi on a 5" inch screen currently.

Could someone please help me?

Thanks,
Karl

npaisnel
Posts: 74
Joined: Sun Aug 05, 2018 4:23 pm

Re: Hidden Wastebasket?

Sun Aug 05, 2018 4:25 pm

Ha! I came here for exactly the same reasons ,... to find wastebasket location.
All the best, 73's Neil P, GJ1YOT :D

Return to “Troubleshooting”