Can't delete file in Waste

Can someone please tell me how to empty my waste bin when there is a protected file inside? I’ve tried a few different ideas but nothing has worked yet. The file inside had different permissions and thus, I can’t delete it. Is there is a SU command in terminal I can use?

Thanks!

Use file manager super user mode

Ok, I’m there now but it says the Trash is empty? I’m using Gnome by the way, not KDE.

Hmmm, you are probably logged in as root, and that is root’s trash. :slight_smile: Do NOT login as root to desktop session. Just log in with your own user, and run your file manager in super user mode as caf4926 said. How to do that under Gnome… I have no idea :slight_smile:
Here is the answer: file manager super user - Ubuntu Forums.
User’s trash folder is under ~/.local/share/Trash
Good luck

I’m sorry for this (it was the first in Google) :stuck_out_tongue:
Here is the answer: How to open Nautilus? - openSUSE Forums :wink:

Running nautilus in root mode is essential because some hidden files do not appear when you are normal user. So you can’t delete them…:slight_smile:

I tried running nautilus in su from the terminal but it didn’t show any files in the trash? I’m also logged in as a normal user. Isn’t there a simple command in the terminal that I can run from su and execute?

In your ~./local/share/Trash/files/ folder execute this


# sudo chmod -R 777 * (before executing this command, check one more time, are you in the right folder ;))
# rm -r *

Now go to the ~./local/share/Trash/info/ folder and repeat the Code: section above.

Hi
You need to change to the users directory first. From a terminal it
would be;


malcolml@kermit-opensuse:~$ cd .local/share/Trash/
malcolml@kermit-opensuse:~/.local/share/Trash$ su
Password:
kermit-opensuse:/home/malcolml/.local/share/Trash # ls
files  info
kermit-opensuse:/home/malcolml/.local/share/Trash # rm files/*
kermit-opensuse:/home/malcolml/.local/share/Trash # rm info/*
kermit-opensuse:/home/malcolml/.local/share/Trash # exit
exit

Note the su command (no -) will leave me with users environment.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.16-0.1-default
up 0:28, 2 users, load average: 0.10, 0.04, 0.10
GPU GeForce 6600 TE/6200 TE - Driver Version: 173.14.12

I get ‘cannot remove `files/cedega-engine-6.0.5’: Is a directory’

Yeah of course, because I posted


rm -r *

and not just “rm”.
-r stays for recursive, it will remove you the folders too.
I you are following malcolmlewis’s post then add the -r after every rm.
Good luck

Ahh, much better. Thanks for the help. Kinda funny how a simple thing was so difficult for me. I have a lot to learn. Thanks again.

Hi
Use the -r switch


kermit-opensuse:/home/malcolml/.local/share/Trash # rm -r files/*


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.16-0.1-default
up 2:08, 1 user, load average: 0.13, 0.22, 0.24
GPU GeForce 6600 TE/6200 TE - Driver Version: