[solved]how to sudo delte files in trash?

New to Debian (Or Linux in general)? Ask your questions here!

[solved]how to sudo delte files in trash?

Postby hthi » 2017-08-01 14:10

debian 8 64bit
nautilus

In order to delete files in /var/log, I ran
Code: Select all
gksudo nautilus


In trash none of the deleted files are present.
Is there a command which will delete files in trash? Thank you.
Last edited by hthi on 2017-08-19 17:43, edited 1 time in total.
hthi
 
Posts: 132
Joined: 2015-05-09 15:43

Re: how to sudo delte files in trash?

Postby 4D696B65 » 2017-08-01 18:48

Check trash in /root
User avatar
4D696B65
 
Posts: 2010
Joined: 2009-06-28 06:09

Re: how to sudo delte files in trash?

Postby debiman » 2017-08-02 13:20

most gui file managers i know, do not use the trashcan when run as root.
in other words, deleted is deleted, and you most probably got a warning about it.

Is there a command which will delete files in trash? Thank you.

if there are no files in root's trashcan, there's nothing to delete.
otherwise: empty trash (in file manager).
User avatar
debiman
 
Posts: 1341
Joined: 2013-03-12 07:18

Re: how to sudo delte files in trash?

Postby hthi » 2017-08-14 19:23

Thank you.
You say, if you run
Code: Select all
gksudo nautilus

then, what you click right and move to trash, is deleted? Are you sure?
It does say move to trash.
Further more in /var/log I moved to trash about 40gb of files. I did it
because the system was close to 0gb of free space.
After restarting I was unable to start the gui desktop. Telling me
the system could not run because of lack of free space.
Pressing ctrl + alt + f2, in command line, I got
other files deleted. After restart of the computer, I was able to
start the gui desktop.
Indicating that the files in /var/log I moved to trash are located
somewhere. If they are, I cannot find the location. I
navigated to /home/pc/.local/share/Trash. The 3 folders were
empty.
hthi
 
Posts: 132
Joined: 2015-05-09 15:43

Re: how to sudo delte files in trash?

Postby Zjho » 2017-08-15 14:56

Was /root/.local/share/Trash empty too ?
My nautilus 3.22.3-1 does use this directory with root although log file sizes are controlled by other means.
User avatar
Zjho
 
Posts: 20
Joined: 2016-09-15 17:46

Re: how to sudo delte files in trash?

Postby wizard10000 » 2017-08-15 16:10

As Zjho mentioned there are other ways to manage logfiles. Take a look at the man page for logrotate.

Good luck -
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1197
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: how to sudo delte files in trash?

Postby debiman » 2017-08-16 15:12

hthi wrote:You say, if you run
Code: Select all
gksudo nautilus

then, what you click right and move to trash, is deleted? Are you sure?
no, i did not say that.
i said that in my experience, the filemanager does not support moving stuff to trash when run as root.
yours obviously does, and you have to find out where it puts the files, or look in the trash can and empty or restore them, what ever.
Further more in /var/log I moved to trash about 40gb of files. I did it
because the system was close to 0gb of free space.
After restarting I was unable to start the gui desktop. Telling me
the system could not run because of lack of free space.
yes, because moving things to trash is not the same as deleting.

I cannot find the location. I
navigated to /home/pc/.local/share/Trash. The 3 folders were
empty.
no, when you run as root, it means you run as the user named root, essentially.
so the trash can is somewhere in /root, probably /root/.local/share/Trash

PS:
system maintenance should be done in other ways.
through the terminal, or preferably programmatically.
i'm sure systemd provides a mechanism for roatating or limiting log files.
User avatar
debiman
 
Posts: 1341
Joined: 2013-03-12 07:18

Re: how to sudo delte files in trash?

Postby hthi » 2017-08-19 17:37

Thank you. The trashed files were located in
Code: Select all
/root/.local/share/Trash/files

sudo rm deleted the files.

through the terminal, or preferably programmatically.

I thought sudo gksudo nautilus would be faster.
hthi
 
Posts: 132
Joined: 2015-05-09 15:43


Return to Beginners Questions

Who is online

Users browsing this forum: caulfield and 6 guests

fashionable