View previous topic :: View next topic |
Author |
Message |
cgits n00b
Joined: 15 Jul 2005 Posts: 71 Location: Europe
|
Posted: Sun Nov 26, 2006 5:48 pm Post subject: Cannot delete file (reiserfs) [SOLVED] |
|
|
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 |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Sun Nov 26, 2006 6:04 pm Post subject: |
|
|
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 |
|
|
cgits n00b
Joined: 15 Jul 2005 Posts: 71 Location: Europe
|
Posted: Sun Nov 26, 2006 8:26 pm Post subject: |
|
|
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 |
|
|
|