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 01-08-2012, 11:35 AM   #1
Glaedr
Member
 
Registered: Jun 2011
Distribution: OpenSuse 11.4
Posts: 64

Rep: Reputation: Disabled
Wastebin corrupted?


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 11:36 AM. Reason: Adding OS
 
Old 01-09-2012, 10:28 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,669
Blog Entries: 12

Rep: Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894
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.
 
Old 01-09-2012, 10:28 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,877

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
Have you checked the permissions on the files you want to delete?
 
Old 01-09-2012, 10:53 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,669
Blog Entries: 12

Rep: Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894
bigrigdriver makes a good point.

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.)
 
Old 01-10-2012, 10:01 AM   #5
Glaedr
Member
 
Registered: Jun 2011
Distribution: OpenSuse 11.4
Posts: 64

Original Poster
Rep: Reputation: Disabled
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.

Last edited by Glaedr; 01-10-2012 at 10:04 AM.
 
Old 01-10-2012, 09:19 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,669
Blog Entries: 12

Rep: Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894
Using the rm command with wildcards is likely the best bet. Good luck.
 
Old 01-20-2012, 08:13 PM   #7
Glaedr
Member
 
Registered: Jun 2011
Distribution: OpenSuse 11.4
Posts: 64

Original Poster
Rep: Reputation: Disabled
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

Both were tried as root.
 
Old 01-20-2012, 09:16 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,669
Blog Entries: 12

Rep: Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894
Quote:
Originally Posted by Glaedr View Post
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.

Last edited by frankbell; 01-20-2012 at 09:20 PM.
 
1 members found this post helpful.
Old 01-22-2012, 04:35 PM   #9
Glaedr
Member
 
Registered: Jun 2011
Distribution: OpenSuse 11.4
Posts: 64

Original Poster
Rep: Reputation: Disabled
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 04:50 PM. Reason: typo
 
Old 01-22-2012, 08:49 PM   #10
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,669
Blog Entries: 12

Rep: Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894
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.
 
Old 01-22-2012, 08:57 PM   #11
Glaedr
Member
 
Registered: Jun 2011
Distribution: OpenSuse 11.4
Posts: 64

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-22-2012, 09:12 PM   #12
Glaedr
Member
 
Registered: Jun 2011
Distribution: OpenSuse 11.4
Posts: 64

Original Poster
Rep: Reputation: Disabled
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.

Last edited by Glaedr; 01-22-2012 at 09:18 PM.
 
Old 01-22-2012, 09:30 PM   #13
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,669
Blog Entries: 12

Rep: Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894
Frankly, I'm fresh out of guesses.

I'd have to look at it first-hand (no, I'm not asking to and I don't want to, I'm just expressing the depth of my cluelessness) to have any ideas!
 
Old 01-22-2012, 11:14 PM   #14
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
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"
 
1 members found this post helpful.
Old 01-23-2012, 03:00 PM   #15
Glaedr
Member
 
Registered: Jun 2011
Distribution: OpenSuse 11.4
Posts: 64

Original Poster
Rep: Reputation: Disabled
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.

Last edited by Glaedr; 01-23-2012 at 10:38 PM.
 
  


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
Can't empty undetectable contents of Wastebin in kde nnjond Linux - Newbie 8 09-23-2010 07:56 AM
KDE 4.1.2 Lost Wastebin in Dolphin mikemrh9 Linux - Desktop 2 11-08-2008 07:51 PM
KDE will not delete or move anything to wastebin Christopher Debian 2 11-18-2007 11:38 AM
wastebin questions gothicbob SUSE / openSUSE 2 04-07-2007 06:24 AM
Missing Space: Problem with Wastebin? rrsc16954 Mandriva 3 11-08-2005 02:42 PM


All times are GMT -5. The time now is 09:37 PM.

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