Bug 23864 - The "-f" option of "ln" fails with directories
Summary: The "-f" option of "ln" fails with directories
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fileutils
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-12 09:08 UTC by cradford
Modified: 2007-04-18 16:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-01-12 09:08:57 UTC
Embargoed:


Attachments (Terms of Use)

Description cradford 2001-01-12 09:08:25 UTC
"ln -fs" fails when applied to directories (both hard & soft link work for 
files, user privelidge make no difference).
drwxr-xr-x    2 root     root         4096 Jan 12 08:39 one
drwxr-xr-x    2 root     root         4096 Jan 12 08:39 two
[root@linus pu]# ln -s one ug
[root@linus pu]# ls -l
total 8
drwxr-xr-x    2 root     root         4096 Jan 12 08:39 one
drwxr-xr-x    2 root     root         4096 Jan 12 08:39 two
lrwxrwxrwx    1 root     root            3 Jan 12 08:40 ug -> one
[root@linus pu]# ln -fs two ug
[root@linus pu]# ls -l
total 8
drwxr-xr-x    2 root     root         4096 Jan 12 08:40 one
drwxr-xr-x    2 root     root         4096 Jan 12 08:39 two
lrwxrwxrwx    1 root     root            3 Jan 12 08:40 ug -> one
[root@linus pu]# ls -l one
total 0
lrwxrwxrwx    1 root     root            3 Jan 12 08:40 two -> two

root@linus pu]# rpm -qif /bin/ln
Name        : fileutils                    Relocations: (not relocateable)
Version     : 4.0x                              Vendor: Red Hat, Inc.
Release     : 3                             Build Date: Fri 25 Aug 2000 
02:24:18 PM GMT
Install date: Thu 16 Nov 2000 11:12:34 AM GMT      Build Host: 
porky.devel.redhat.com
Group       : Applications/File             Source RPM: fileutils-4.0x-
3.src.rpm
Size        : 1905548                          License: GPL
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : The GNU versions of common file management utilities.

Comment 1 Bernhard Rosenkraenzer 2001-01-12 11:09:41 UTC
This is the intended behavior. Linking anything to a directory will create a
link inside the directory, even with -f.



Note You need to log in before you can comment on or make changes to this bug.