Linux - NewbieThis 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.
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.
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?
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?
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
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.)
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
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.
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.
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.