You are not logged in.

#1 2010-01-27 23:22:28

youjh
Member
From: Cincinnati
Registered: 2009-12-07
Posts: 50

[Solved] Trash won't empty - was a corrupted NTFS disk

Hey all,

So I noticed that there are some files in my trash can that won't go away.
When I hit 'empty trash', any new files will be deleted, but several just won't be deleted.

If I right click and click 'delete item permanently', it gives the following error:
'Failed to delete the item from the trash'

Any ideas?

Last edited by youjh (2010-02-02 03:12:58)


Code can be clean, fast, or object oriented. Pick two.

Offline

#2 2010-01-27 23:27:26

ZaQ
Member
Registered: 2009-12-12
Posts: 106

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

Open a terminal, go to your trash folder and delete the files as root/sudo.

The trash folder should be under ~/.Trash, ~/.local/Trash or something like that.

Offline

#3 2010-01-27 23:39:31

youjh
Member
From: Cincinnati
Registered: 2009-12-07
Posts: 50

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

OK, so under ~/.local/share/Trash there are three folders:
expunged, files, and info

All three of these are empty and do not list the files found in the trash can.


Code can be clean, fast, or object oriented. Pick two.

Offline

#4 2010-01-27 23:49:14

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

What happens when you open the Trash - can you see the files then?


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#5 2010-01-27 23:51:09

youjh
Member
From: Cincinnati
Registered: 2009-12-07
Posts: 50

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

Yep. That's the problem.


Code can be clean, fast, or object oriented. Pick two.

Offline

#6 2010-01-28 00:07:10

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

Do you have any USB disks connected? Perhaps the files are in their Trash.

Offline

#7 2010-01-28 00:10:42

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

Can you see the files in the filesystem? E.g. via find ~/. -name <file in trash>


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#8 2010-01-28 00:20:25

youjh
Member
From: Cincinnati
Registered: 2009-12-07
Posts: 50

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

Aha! They are located in a mounted disk.
I was able to remove the files, but two folders are being stubborn:

sudo rm -r thrikpriest/
rm: cannot remove `thrikpriest': No such file or directory


Code can be clean, fast, or object oriented. Pick two.

Offline

#9 2010-01-28 00:22:16

theapodan
Member
From: Virginia, USA
Registered: 2008-10-21
Posts: 116

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

youjh wrote:

OK, so under ~/.local/share/Trash there are three folders:
expunged, files, and info

All three of these are empty and do not list the files found in the trash can.

Maybe the files are dotfiles (e.g. .xinitrc), which in linux are hidden.  Trash itself, at least in thunar, seems to make these files visible, but if you browsed to ~/.local/Trash/files, they might not show up, unless you enable show hidden files, or run ls with the switches -ls

Offline

#10 2010-01-28 00:54:46

youjh
Member
From: Cincinnati
Registered: 2009-12-07
Posts: 50

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

theapodan wrote:
youjh wrote:

OK, so under ~/.local/share/Trash there are three folders:
expunged, files, and info

All three of these are empty and do not list the files found in the trash can.

Maybe the files are dotfiles (e.g. .xinitrc), which in linux are hidden.  Trash itself, at least in thunar, seems to make these files visible, but if you browsed to ~/.local/Trash/files, they might not show up, unless you enable show hidden files, or run ls with the switches -ls

I found these files under a mounted disk in /media/Shared/.Trash-1000. As to my previous post, I have deleted the data, but two folders physically remain on the drive in the .Trash-1000 folder and can not be deleted, either through the terminal or with the 'Empty Trash' function in the Trash Can. They appear in both the Trash Can and can be found in the Trash location on the mounted disk.


Code can be clean, fast, or object oriented. Pick two.

Offline

#11 2010-01-31 16:55:47

theapodan
Member
From: Virginia, USA
Registered: 2008-10-21
Posts: 116

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

Weird.  What are the permissions on the folders?  And who owns them?

Offline

#12 2010-01-31 17:17:46

youjh
Member
From: Cincinnati
Registered: 2009-12-07
Posts: 50

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

My user owns them, the have full file permissions (775), and neither the user nor su can remove them.
I don't think its a file permission issue, it seems the folders can't be found:

/media/Shared/.Trash-1000/files$ ls -lrat
total 24
drwxrwxr-x 1 joe users     0 Dec 14 19:23 ..
drwxrwxr-x 1 joe users  8192 Dec 14 19:52 eltee_john_mcclane
drwxrwxr-x 1 joe users  4096 Jan 27 19:16 .
drwxrwxr-x 1 joe users 12288 Jan 27 19:18 thrikpriest
/media/Shared/.Trash-1000/files$ sudo rm -r eltee_john_mcclane/
Password: 
rm: cannot remove `eltee_john_mcclane': No such file or directory
/media/Shared/.Trash-1000/files$

Code can be clean, fast, or object oriented. Pick two.

Offline

#13 2010-01-31 17:38:08

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

Try by inode: http://www.cyberciti.biz/tips/delete-re … umber.html

If that doesn't work, give us the output of ls -il and getfacl.

Also, what file system is that disk?


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#14 2010-01-31 18:21:36

youjh
Member
From: Cincinnati
Registered: 2009-12-07
Posts: 50

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

its a mounted NTFS partition that is shared between Arch and Win7

no success with the inode deletion, it was able to list the inode, but not find it to delete ;-)

here is what I tried:

/media/Shared/.Trash-1000/files$ stat thrikpriest/
  File: `thrikpriest/'
  Size: 12288         Blocks: 24         IO Block: 4096   directory
Device: 807h/2055d    Inode: 8927        Links: 1
Access: (0775/drwxrwxr-x)  Uid: ( 1000/     joe)   Gid: (  100/   users)
Access: 2010-01-27 19:18:50.000000000 -0500
Modify: 2010-01-27 19:18:50.000000000 -0500
Change: 2010-01-27 19:18:50.000000000 -0500

/media/Shared/.Trash-1000/files$ find -inum 8927 -exec rm -ri {} \;
rm: remove directory `./thrikpriest'? y
rm: cannot remove `./thrikpriest': No such file or directory

/media/Shared/.Trash-1000/files$ ls -il thrikpriest/
total 0

/media/Shared/.Trash-1000/files$ getfacl thrikpriest/
# file: thrikpriest/
# owner: joe
# group: users
user::rwx
group::rwx
other::r-x

Code can be clean, fast, or object oriented. Pick two.

Offline

#15 2010-01-31 19:15:55

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

Some more questions/options,

* does rmdir work?

* can you move the items out of trash, such as /tmp, and rmdir there?

* can you rename the files and rmdir those?

* can you access and delete the files from Windows? if so, file a bug ASAP


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#16 2010-02-02 03:12:23

youjh
Member
From: Cincinnati
Registered: 2009-12-07
Posts: 50

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

OK, so no to everything on there.

I ran a check-disk with Windows (would have with linux, but no ntfs check support yet ;-)   ), and apparently the drive structure was corrupted. Check-disk patched it up for me, and flagged those files as corrupted, cleaned the structure, and removed them.

Hmm. Would this have happened due to sharing the NTFS drive between Arch and Windows?


Code can be clean, fast, or object oriented. Pick two.

Offline

#17 2010-02-02 08:26:06

Neheb
Member
From: Norway
Registered: 2009-05-23
Posts: 39

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

youjh wrote:

Hmm. Would this have happened due to sharing the NTFS drive between Arch and Windows?

I don't think so. I have most of my harddrives as ntfs and sharing them between windows and arch and I haven't noticed anything after 6 months of doing so.

Offline

#18 2010-02-02 14:44:29

youjh
Member
From: Cincinnati
Registered: 2009-12-07
Posts: 50

Re: [Solved] Trash won't empty - was a corrupted NTFS disk

OK. Must have just been something weird.


Code can be clean, fast, or object oriented. Pick two.

Offline

Board footer

Powered by FluxBB