[lug] Odd Problem with rm and Symbolic Links

stimits at comcast.net stimits at comcast.net
Sat Dec 28 18:53:27 MST 2013


I'm using Fedora 19, fully updated. I'd created a symbolic link with "ln -s <real> <symbolic>", but ls -ld shows this as a directory, while a simple ls -a --color=auto shows that this is indeed a symbolic link, and if I use "ls -l" from the parent the output indicates it is a soft link and where the link goes.

rm fails. If I go to "rm <link>" it tells me this is a directory...so apparently ls -ld and rm agree, but ls -a --color=auto and ls -l from parent DISagree with rm. If I use "rm -f <link>", it refuses, because it is a directory.

If I use "rmdir <link>", it also refuses, because it is NOT a directory!

My only success is to "rm -Rf" the link. Sadly, this removes all of the subdirectories the link pointed at...removing a symbolic link should not remove what it points at! What gives? Was rm or the use of symbolic link written to a different standard than I'm used to? Is there some new way in fedora to remove a symbolic link without removing what it points to? I have a backup of what it removed, but something seems drastically wrong.

Both rm and ln are provided by rpm coreutils-8.21-11.fc19.x86_64. Filesystem is a single partition with ext4. Kernel is current 3.12.5-200.fc19.x86_64.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20131229/fe8846b0/attachment.html>


More information about the LUG mailing list