Symbolic link problem
William M. Quarles
quarlewm at jmu.edu
Sat Nov 27 14:49:17 UTC 2004
Deron Meranda wrote:
> On Fri, 26 Nov 2004 01:52:03 -0500, William M. Quarles <quarlewm at jmu.edu> wrote:
>
>>[root at resistance plugins]# rm ns7/quarlewm/
>>rm: remove directory `ns7/quarlewm/'? y
>>rm: cannot remove directory `ns7/quarlewm/': Is a directory
>>[root at resistance plugins]# rm -Rf ns7/quarlewm/
>>rm: cannot remove `ns7/quarlewm/': Not a directory
>
>
> You didn't specify what are symlinks and what are your directories.
> Perhaps the output of an "ls -l" might help.
What I am trying to remove above is a symlink.
[root at resistance plugins]# ls -l ns7/quarlewm
lrwxrwxrwx 1 root root 15 Nov 26 01:42 ns7/quarlewm -> /home/quarlewm/
> Also, please try using /bin/rm as it appears your "rm" is currently an
> alias or a shell function and therefore we don't see all the options.
> (If you enter "type rm" you'll see what the shell thinks rm really
> is).
[root at resistance SPECS]# type rm
rm is aliased to `rm -i'
> And another thing to be aware of is that putting a "/" at the end of a
> pathname can change how it is interpreted, especially with symlinks
> involved. So, what happens if you do "rm ns7/quarlewm" instead?
You're right. I thought that I tried that. IT WORKED!
[root at resistance plugins]# /bin/rm ns7/quarlewm
[root at resistance plugins]#
>>I also cannot place force a different symbolic link in it's place, as it
>>just places the new link inside of the "directory."
>
> Either remove the existing symlink first, or also supply the options
> "-n -f", as in,
>
> ln -n -f -s new_target symlink_name
[root at resistance plugins]# ln -nsf
/usr/java/jdk1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so ns7
[root at resistance plugins]#
Fabulous!
Thank you,
William
More information about the fedora-list
mailing list