Take out the papers and the trash….

Every now and then I do something that I shouldn’t. Okay, probably more often than that. Either way, I really shouldn’t open up a file explorer as root, and I REALLY shouldn’t “delete” stuff while in an open file explorer as root. The reason that you shouldn’t do that is because file explorers don’t actually “delete” things. They put them in the trash. This gets doubly complicated when you use sudo to open your file explorer, because then the root “trash” ends up in your home trash.

That’s really annoying because when you right click the trash can and choose “empty”, you get an ugly pop up window explaining why you don’t have permission to empty your own garbage.

What’s worse, if you sudo open your file explorer again, you can’t get to the trash, because it is not a “real place”. Opening trash:/// in your file explorer just brings up more ugly pop up windows.

Fortunately, the answer is easy.

$ cd ~/.local/share/Trash/

Now you are in your trash can. If you look into your ./files/ folder, you will see the culprits. So, the simple thing to do is:

$ sudo chown -Rv <yourusername>:<yourusername> ./files/

or sudo chown -Rv alaskalinuxuser:alaskalinuxuser ./files/ in my case.

Now all the files in your trash can have been modified to be yours. Yes, now it is your mess to clean up, and to take out the trash you can once again right click on the trash can and say “empty”.

Linux – keep it simple.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s