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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
12-20-2007, 04:58 AM
|
#16
|
Member
Registered: Dec 2005
Location: The Netherlands
Distribution: Kubuntu 8.10 KDE4
Posts: 208
Rep:
|
A google search came up with the gnome trash pathname: 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.
|
|
|
12-20-2007, 10:47 AM
|
#17
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
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?
|
|
|
12-20-2007, 02:14 PM
|
#18
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
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
|
|
|
12-20-2007, 02:37 PM
|
#19
|
LQ Newbie
Registered: Mar 2005
Location: San Antonio
Posts: 20
Rep:
|
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?
|
|
|
12-20-2007, 04:12 PM
|
#20
|
Member
Registered: Dec 2005
Location: The Netherlands
Distribution: Kubuntu 8.10 KDE4
Posts: 208
Rep:
|
Quote:
Originally Posted by MooseMagnet
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: 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.
|
|
|
12-20-2007, 04:48 PM
|
#21
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
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.
|
|
|
12-20-2007, 05:31 PM
|
#22
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,441
|
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
|
|
|
12-20-2007, 06:32 PM
|
#24
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
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.
|
|
|
12-20-2007, 07:16 PM
|
#25
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,441
|
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'
|
|
|
12-20-2007, 10:08 PM
|
#26
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
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.
|
|
|
12-20-2007, 10:17 PM
|
#27
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
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
|
|
|
12-20-2007, 10:21 PM
|
#28
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
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.

|
|
|
12-21-2007, 04:17 AM
|
#29
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Quote:
Originally Posted by MooseMagnet
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! 
|
|
|
12-21-2007, 09:49 AM
|
#30
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
Yes. Correct.
|
|
|
All times are GMT -5. The time now is 07:33 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|