sudo nautilus trash/delete function puts trash where?

Asked by laptoplinux

When I sudo nautilus and delete a file or folder where does it go? It doesn't appear in either the root trash or the user trash. Is it automatically deleted or is it sitting someplace on the hard disk eating up space waiting for me to "empty the trash" somehow?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
laptoplinux
Solved:
Last query:
Last reply:
Revision history for this message
pablitofuerte (pablitofuerte) said :
#1

Using nautilus as root, when you delete a file or directory they go to root's Trash (/root/.local/share/Trash) the same as when deleting a file from your USER accout it goes to the current user-trash (/home/USER/.local/share/Trash)

Revision history for this message
laptoplinux (laptoplinux) said :
#2

Thank you for the reply. I do not have a .local file at root and when I click on the Trash icon in a root nautilus I recieve the following message:

The folder contents could not be displayed.
Sorry, could not display all the contents of "trash": Operation not supported

However afer some hunting around I found the trash folder (Trash-0) in Home. I guess the directory structure has changed in Jaunty.

Regardless since I found it I will mark this as solved. Thanks.

Revision history for this message
laptoplinux (laptoplinux) said :
#3

Sorry 1 more question. Now that I found them how do I delete them???

If I "delete" them they reappear in the trash folder with an apended ".2". I fi move to trash...of course they just reappear in the same folder.

Revision history for this message
wojox (wojox) said :
#4

Run these two commands seperatly in a terminal:

sudo rm -rf /home/*/.local/share/Trash/*/**
sudo rm -rf /root/.local/share/Trash/*/**

Revision history for this message
Sam_ (and-sam) said :
#5

> When I sudo nautilus

To avoid issues, please never run it like this, instead use:
gksudo nautilus

https://help.ubuntu.com/community/RootSudo#Graphical%20sudo
https://help.ubuntu.com/community/UsingTheTerminal
http://library.gnome.org/users/user-guide/stable/gosnautilus-8.html.en

To view files in trash you may add the related applet to the panel.
Right click on panel -> add to panel -> scroll to gnome trash can
http://library.gnome.org/users/user-guide/stable/panels-addobject.html.en

## A file is 'moved' to trash, to 'delete' it has to be removed from trash.

Options to delete a file right away see Nautilus preferences
http://library.gnome.org/users/user-guide/stable/gosnautilus-56.html.en

or use
shift+del

Revision history for this message
laptoplinux (laptoplinux) said :
#6

Thank you for the replies.

Sam. Thank you for the information and advice. I will make it a point to gksudo from now on.

wojox. Those commands didn't work for me because as I indicated for some odd reason my trash is no.local file in my root. For some odd reason the root trash is appearing in my Home folder.

Just as a side note how do I "cd" to a folder that is controlled by root. When I use the cd command in the terminal it returns a "permission denied" and if I "sudo cd folder name" it returns command cd not known. I can ls the folder no problem. Sorry if this is a noob question.

Regardless, the shift+ctrl option used in gksudo nautilus deleted the files in question in the root trash. Thank you.

Revision history for this message
Sam_ (and-sam) said :
#7

e.g.:
cd /root/.local/share/
sudo ls -a Trash
sudo ls -a Trash/files

If you do:
gksudo nautilus

you'll have also access to the root trash.

Trash of user_xxx is in:
/home/user_xxx/.local/share/Trash

https://help.ubuntu.com/9.04/basic-commands/C/
http://linuxcommand.org/learning_the_shell.php

Revision history for this message
SignedAdam (signedadam) said :
#8

I also have ran in to this, please fix it, this is very confusing and timely, i had 22gbs of data hiding and i did not find it very funny trying to find it,