Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot delete file (reiserfs) [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
cgits
n00b
n00b


Joined: 15 Jul 2005
Posts: 71
Location: Europe

PostPosted: Sun Nov 26, 2006 5:48 pm    Post subject: Cannot delete file (reiserfs) [SOLVED] Reply with quote

Hello, I have a strange problem. I have created a soft link to a directory, and now it's all messed up and I can't delete it!

Code:
christos@glorfindel /usr/share/mplayer $ ls -l                         
total 66
-rw-r--r--  1 root root 56696 2006-07-19 02:31 codecs.conf
lrwxrwxrwx  1 root root    53 2006-11-26 01:37 font-arial-18-iso-8859-7 -> fonts/font-arial-iso-8859-7/font-arial-18-iso-8859-7/
drwxr-xr-x 18 root root   736 2006-11-26 01:45 fonts
-rw-r--r--  1 root root  2212 2006-07-19 02:31 input.conf
-rw-r--r--  1 root root  2534 2006-07-19 02:31 menu.conf
lrwxrwxrwx  1 root root    25 2006-07-19 02:31 mplayer.conf -> ../../../etc/mplayer.conf
drwxr-xr-x  3 root root    72 2006-07-19 02:31 Skin
drwxr-xr-x 68 root root  1856 2006-06-24 14:42 skins
christos@glorfindel /usr/share/mplayer $ sudo rm font-arial-18-iso-8859-7/
rm: cannot remove `font-arial-18-iso-8859-7/': Is a directory
christos@glorfindel /usr/share/mplayer $ sudo rm -r font-arial-18-iso-8859-7/
rm: cannot remove directory `font-arial-18-iso-8859-7/': Not a directory
christos@glorfindel /usr/share/mplayer $ sudo rmdir font-arial-18-iso-8859-7/
rmdir: font-arial-18-iso-8859-7/: Not a directory
christos@glorfindel /usr/share/mplayer $ ls font-arial-18-iso-8859-7/
christos@glorfindel /usr/share/mplayer $ ls font-arial-18-iso-8859-7/ -l
total 0


What is wrong with this file? What can I do?
Thanks for any help.


Last edited by cgits on Sun Nov 26, 2006 8:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Sun Nov 26, 2006 6:04 pm    Post subject: Reply with quote

If 'foobar' is a symlink to a directory, then 'foobar' is the symlink and 'foobar/' is the directory it links to. If you want to delete the symlink but not the directory you have to use the name without / at the end. This is one of the few cases where tab completion may not result in what you want.
Back to top
View user's profile Send private message
cgits
n00b
n00b


Joined: 15 Jul 2005
Posts: 71
Location: Europe

PostPosted: Sun Nov 26, 2006 8:26 pm    Post subject: Reply with quote

Wow, I didn't know that.
Luckily you noticed this detail, and you are right that tab completion caused this problem.
Thanks a lot.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum