LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-20-2007, 04:58 AM   #16
V!NCENT
Member
 
Registered: Dec 2005
Location: The Netherlands
Distribution: Kubuntu 8.10 KDE4
Posts: 208

Rep: Reputation: 30

A google search came up with the gnome trash pathname:
Quote:
~/.gnome-desktop/Trash
The ~ means your home folder. You can just type ~ anywhere and Linux always replaces it with the pathname to your home folder automatically.

Try doing this:
Quote:
cd ~/.gnome-desktop/Trash
ls -a
and see if you can find your file there.

EDIT:Note that Linux is case sensitive! "Trash" is a different folder than "trash" for example.

Last edited by V!NCENT; 12-20-2007 at 05:00 AM.
 
Old 12-20-2007, 10:47 AM   #17
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 183
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Okay, maybe

Okay, maybe I'll try that. BUT...

This whole mess started by an ubuntu helper sending me terminal commands, but they didn't pay close attention, and they told me to enter commands that caused this, and other problems. They were VERY sloppy with the typing. I don't want any more of that. And that's why I've been posting my questions here, instead of on the ubuntu help forums.

So... If that terminal command you suggest is perfect as you typed it, I am willing to try it.

The problem is people suggest commands without being careful enough what they type.

Is the command you suggest perfect and safe, IF I COPY AND PASTE IT INTO THE TERMINAL just as you typed it?
 
Old 12-20-2007, 02:14 PM   #18
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 183
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Too risky for me

I tried copying and pasting from your command the text that would chown for all files in .Trash. But I'm missing an operand.

Can you help me with the command that would chown all files in .Trash ?
Then I can safely delete via the GUI. Right?

Thanks.
Rich
 
Old 12-20-2007, 02:37 PM   #19
koflanagan
LQ Newbie
 
Registered: Mar 2005
Location: San Antonio
Posts: 20

Rep: Reputation: 0
why not just su to root and do a rm -rf /home/rich/.Trash and when you decide to delete something later it will recreate the .Trash folder with the correct permissions?
 
Old 12-20-2007, 04:12 PM   #20
V!NCENT
Member
 
Registered: Dec 2005
Location: The Netherlands
Distribution: Kubuntu 8.10 KDE4
Posts: 208

Rep: Reputation: 30
Quote:
Originally Posted by MooseMagnet View Post
So... If that terminal command you suggest is perfect as you typed it, I am willing to try it.

The problem is people suggest commands without being careful enough what they type.

Is the command you suggest perfect and safe, IF I COPY AND PASTE IT INTO THE TERMINAL just as you typed it?
I admire your awareness I really do. Most people do not think but just do what they are told. I admire that.

Therefore, to not just shoveling things down your throaght, I explained what the command stuff did. Yes mine is 'perfect'. I suggest not blindly following what the last poster told you to. Why? You don't know what it means. Be very carefull when the command programm displays a # instead of a $. $ means that your actions will be treated as a user, and from this can come no harm to the system. # means that your actions will be treated as a superuser/administrator/root, and from this can come serious harm to the system. Commands like su and sudo can result in superuser/admin/root acces.

So let's do the following:
First we need to go to the folder that the file is in you want to delete:
Code:
cd ~/.gnome-desktop/Trash
cd = Change Directory
~ = home
/.gnome-desktop/Trash = your trash folder

Does ~/.gnome-desktop/Trash exists or does the command program tell you that 'There is no such file or directory'. If the last is the case then keep searching for the right pathname to your folder. If it exists the command program says nothing and we just switched to the trash folder and we need to do the following:
List all the files in the folder to see what files there are to delete and what their exact names are. We do that by typing this:
Code:
ls -a
ls = LiSt
-a = All

Now type this to delete a file you want to delete:
Code:
sudo rm insert filename here
sudo = do the following with administrator rights
rm = ReMove
insert filename here = replace this sentence with the file you want to delete

That's it.
 
Old 12-20-2007, 04:48 PM   #21
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 183
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Aaarrggghhh

Oh..... I can't.

I can do all that you suggest BUT type in the full name of the file. The name of that file has this -> ... <- in it. I don't know what this is. The path/filename has been abbreviated.

I can cd to .Trash, and list which files are in .Trash. But I can't do any rm without the complete path/filename.

Here is the result:

rich@rich-laptop:~$ cd ~/.Trash
rich@rich-laptop:~/.Trash$ locate gspca.mod
/home/rich/.Trash/...gspca.mod
/home/rich/.Trash/...gspca.mod/.tmp_versions
/home/rich/.Trash/...gspca.mod/.tmp_versions/gspca.mod
rich@rich-laptop:~/.Trash$ ls -a
. .. 1964551.divx ...gspca.mod
rich@rich-laptop:~/.Trash$ rm ...gspca.mod
rm: cannot remove `...gspca.mod': Is a directory
rich@rich-laptop:~/.Trash$ rm gspca.mod
rm: cannot remove `gspca.mod': No such file or directory
rich@rich-laptop:~/.Trash$

When I copy and paste "...gspca.mod" from the previous line, it tells me it is a directory. When I type the name without the "..." it tells me there is no such file. (Notice, I have a movie in the trash.)

Pulling my hair out.
 
Old 12-20-2007, 05:31 PM   #22
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Ok, lets see what's going on; please do this (after thinking about it )

cd ~/.Trash
ls -lt

basically, go into the .Trash dir and do a full listing, so we can see ownerships/permissions and filetypes.

I suspect that

cd /home/rich/
rm -rf .Trash

will solve the problem
 
Old 12-20-2007, 06:06 PM   #23
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 183
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Here are the results:

rich@rich-laptop:~$ cd ~/.Trash
rich@rich-laptop:~/.Trash$ ls -lt
total 0
rich@rich-laptop:~/.Trash$ ls -a
. .. ...gspca.mod
rich@rich-laptop:~/.Trash$

Crazy stuff, for sure.
 
Old 12-20-2007, 06:32 PM   #24
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 183
Blog Entries: 1

Original Poster
Rep: Reputation: 15
And this:

rich@rich-laptop:~$ rm -rf ~/.Trash/*
rich@rich-laptop:~$ cd ~/.Trash
rich@rich-laptop:~/.Trash$ ls -a
. .. ...gspca.mod
rich@rich-laptop:~/.Trash$

Something is very weird about this.
 
Old 12-20-2007, 07:16 PM   #25
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
It needs to delete by removing the inode entry. Do it my way instead of using the .Trash/*, because that tells it to delete from there down.
My way should delete the .Trash dir as well, then you can use

touch .Trash

to re-create it.
Make sure you record the ownerships/perms for .Trash first, so we can restore it properly afterwards

read the man page on 'touch'
 
Old 12-20-2007, 10:08 PM   #26
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 183
Blog Entries: 1

Original Poster
Rep: Reputation: 15
How do I record the ownerships/perms for .Trash ?

I don't understand that. I own .Trash. There is a file in .Trash that I do not own. That is the only file in .Trash, and it's the one I want to delete.
 
Old 12-20-2007, 10:17 PM   #27
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 183
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Someone on the ubuntu forum found a way.

gksudo nautilus ~/.Trash

Then when Nautilus opened the GUI for ".Trash - File Browser" I pressed the Del key, and viola - it is gone. I checked to make sure, and it is gone.

Now... That was weird.

Thank you all very much for your help and education. I couldn't manage this laptop without your patient, kind help.

Happy Holidays,
Rich
 
Old 12-20-2007, 10:21 PM   #28
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 183
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Oops, I didn't explain that correctly. After Nautilus opened the GUI, I pressed Ctrl+H, and that made the infamous file visible. Then, I selected that pesky file, and pressed the Del key.

 
Old 12-21-2007, 04:17 AM   #29
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Quote:
Originally Posted by MooseMagnet View Post
This whole mess started by an ubuntu helper sending me terminal commands, but they didn't pay close attention, and they told me to enter commands that caused this, and other problems.
Good you finally solved the problem! Anyway, I think it cannot be all the responsibility of who post commands. It's true that people should pay more attention when typing, but it's always true you have to verify every bit of a command line before trusting it blindly. I've seen some harmful commands posted intentionally here at LQ! So it is always advisable to carefully look at man pages to see what a command does or what an option means... before pressing ENTER!
 
Old 12-21-2007, 09:49 AM   #30
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 183
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Yes. Correct.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Move to trash works beautifully, but empty trash .. different story. kd5eax Mandriva 2 12-04-2007 02:52 PM
Unable to empty trash walden Linux - Software 8 04-04-2007 04:29 PM
Evolution won't empty trash jjonas Linux - Software 0 08-12-2006 05:44 AM
trying to empty trash jasonmcneil0 Linux - Software 4 10-26-2003 03:03 AM
empty trash Moleman Linux - Software 1 05-16-2003 12:23 PM


All times are GMT -5. The time now is 10:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration