Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using Ubuntu 9.10. When I examine a directory, it shows as '?' for user/ownership.

How can I remove it?

-rw-r--r--  1 hap497 hap497  1822 2010-01-28 22:48 IntSizeHash.h
d?????????  ? ?       ?           ?                ? .libs/
-rw-r--r--  1 hap497 hap497   194 2010-02-25 12:12 libwebkit_1_0_la-BitmapImage.lo

I have tried rm and sudo rm but get an error:

$ sudo rm -Rf .libs
rm: cannot remove `.libs': Input/output error

Thank you for any pointers.

share|improve this question

2 Answers 2

You can try removing the file using it's inode:

ls -il

you should see somehting like:

99999 d????????? ? ? ? ? ? .libs/

where 99999 is the inode number. Then try

find . -inum 99999 -exec rm -i {} \;

you will probably have to 'sudo' the find command, since the ownership is corrupted.

If this directory had files in it, you will end up creating orphans & will need to fsck your disk.

share|improve this answer

Just change the ownership to yourself (via sudo chown -R .libs) then recursively remove the directory (rm -R .libs)... if that fails: sudo su -; change into directory; remove contents; return to previous directory and remove the directory.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.