Re: Symbolic link problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Deron Meranda wrote:
On Fri, 26 Nov 2004 01:52:03 -0500, William M. Quarles <quarlewm@xxxxxxx> wrote:

[root@resistance plugins]# rm ns7/quarlewm/
rm: remove directory `ns7/quarlewm/'? y
rm: cannot remove directory `ns7/quarlewm/': Is a directory
[root@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@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@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@resistance plugins]# /bin/rm ns7/quarlewm
[root@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@resistance plugins]# ln -nsf /usr/java/jdk1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so ns7
[root@resistance plugins]#


Fabulous!

Thank you,
William


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux