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.
Yesterday I had to download a backup from my website, unzip it and dig out one of the files. Once I'd found it, I deleted the rest of the extracted files, not realizing that there were two or three files in there which had unknown symbols in the names. They're from some wiki thing I once installed but never got around to filling in. The Wastebin wouldn't delete them. So I restored them and was going to look up today how to get around it. However I've just tried to delete another small file, and it now says that my Wastebin is full when there is nothing in it.
I deleted that one file by holding shift and bypassing the Wastebin, but I'd really prefer not to have to do that every time I need to delete something in case something is deleted accidentally or is later needed again. I can't use the shift key to delete these files, and it's somehow stopping me deleting some of the other files in the same parent directories which don't have strange names at all. I can't rename them either.
I had this problem briefly with another file a little before my last (faulty) harddrive failed a few months ago. And I never did work out how to fix it. Is there any way that I can get rid of these files and fix the Wastebin without having to reinstall the operating system?
I use OpenSuse 11.4 and KDE.
Last edited by Glaedr; 01-08-2012 at 10:36 AM.
Reason: Adding OS
Try opening a terminal and navigating to the Wastebin or (Trashcan or whatever it is called) using the command line, then deleting the files from the command line.
In Gnome it's in a hidden file, ~/.local/share/Trash, which contains three subdirectories; clear out each one using rm *.*.
According to this link, KDE's trash is in the same location. I don't have an active KDE system to test this.
When I've had to clean my Trash from the command line, it has almost always been a permissions error requiring me to do it with root privileges. (This is on my home server, and the troublesome files are often owned by "nobody:nogroup," that is, me from a remote computer.)
Yes, that was the first thing I did. Thanks for the suggestion though. The file names have those little diamond shaped symbols with the question marks inside in them, except for two .php files which have normal names. I deleted the contents of them and saved them in case there was a symbol inside them somewhere. They saved ok but still aren't deleting.
I'll try with the command line and see if it works, but so far it won't let me even put the affected files into the wastebin.
Sorry for the delay in replying, I've been swamped. I just finally tried the wildcard option, and despite the waste bin currently being empty it says:
rm /home/(username)/.local/share/Trash/*
rm: cannot remove `/home/(username)/.local/share/Trash/files': Is a directory
rm: cannot remove `/home/(username)/.local/share/Trash/info': Is a directory
I also tried the command with some of the files themselves, and got:
rm: cannot remove `/home/(username)/Downloads/.backup-5.21.2011_23-31-17/homedir1': Is a directory
rm: cannot remove `/home/(username)/.local/share/Trash/files': Is a directory
rm: cannot remove `/home/(username)/.local/share/Trash/info': Is a directory
ls /home/[username]/.local/share.Trash/files/*.* to verify contents. rm /home/[username]/.local/share.Trash/files/*.*
rm /home/[username]/.local/share.Trash/files/* if necessary.
Repeat for info.
Edit: If there are any directories in there, you can use rm -r. Read man rm before using that option.
It's saying "no such file or directory" when I try both of those lines. I added -r too just in case, and got the same message again. I also just tried asking HostGator how they delete such files in the hope of trying the same option. The agent was not only incredibly slow, I had to repeat the problem three times, not including the description that has to be typed in when LiveChat is first opened AND the idiot deleted the backups that were still on the server without being asked to. He was rather rude too. -.- Maybe it's time to find a new host. One that doesn't use unicode symbols in automatically generated file names. Ugh.
Anyway. Earlier today I somehow managed to delete one of the affected upper directories. There were no unicode symbols in those names though. I also tried downloading and using through Wine, a windows application which is meant to rename files. It ran, but it gave me error messages when I tried to use it. Cause = 3 and cause = 5, depending on whether the filename had unicode in it or not. I have no idea how I managed to delete that one folder. I was taking a look at the properties etc. I did notice, however, that when I change permissions on one of the upper directories and tick the all sub-files and sub-directories option too and then try to delete the files themselves in the lower levels, when refuses to delete them it reverts the permissions on the upper directories back to what they were before. I've also tried changing the ownership btw. It was one of the first things I tried.
Last edited by Glaedr; 01-22-2012 at 03:50 PM.
Reason: typo
If I understand your description properly, maybe deleting the upper directory took the lower directory with it.
I know persons who use Host Gator who speak very highly of the support they've received, so I would suggest not generalizing from this incident. I also know persons who badmouth my hosting service, whereas the few times I've called support, I've received nothing but excellent service. Then, again, I haven't confronted them with anything this odd.
Put it down to strike one and wait for the next pitch.
Mostly they have been fine. But there have been a few incidents like this. I'm wondering if they've switched the place they outsource to recently.
I've tried to delete the directories the corrupted files have been three or four levels down in before with no luck, so I have no idea why it worked this time. Also, I've just noticed that another directory entirely separate from the corrupted files which I bypassed the waste bin with today is now actually sitting in it after rebooting just now. So I'm going to try rm again on it now. Fingers crossed.
Hm. Same message and it went nowhere. But right clicking in the directory and clicking on empty waste bin worked as normal.
...and now files are going into the waste bin as normal. O.o So confused. The corrupted files still won't delete but at least I can apparently use the waste bin again.
Any ideas on getting rid of the files would be welcome, but if they absolutely have to stay where they are, I can hide them for now. Thanks for all your help.
You could try mv /home/(username)/.local/share/Trash /home/(username)/.local/share/Trash.aside and then delete a test file from the GUI file manager to see if that recreates /home/(username)/.local/share/Trash. If it does, you could try rm -fr /home/(username)/.local/share/Trash.aside
The "rm: cannot remove <directory>: Is a directory" messages are normal when rm is used without the -r option. From the rm man page: "By default, rm does not remove directories. Use the --recursive (-r or -R) option to remove each listed directory, too, along with all of its contents"
Well just now the waste bin started being weird again, so I tried *.* and * again and that didn't work. So I tried the mv/rm option. The first line seemed to work but then I got this message when trying to add a file into the waste bin: Could not write to file /home/[username]/.local/share/Trash/info/[filename].trashinfo.
So I tried creating Trashinfo.aside and using: mv /home/[username]/.local/share/Trash/ /home/[username]/.local/share/Trashinfo.aside
and got:
mv: cannot stat `/home/[username]/.local/share/Trash/': No such file or directory
When I checked I saw that it hadn't remade the Trash directories after all. So I remade them and it seems to be working again now. Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.