Date: Mon, 12 Aug 2002 13:05:10 +0200 (CEST) From: Lukas Ertl <l.ertl@univie.ac.at> To: FreeBSD-gnats-submit@FreeBSD.org Subject: standards/41576: POSIX compliance of ln(1) Message-ID: <200208121105.g7CB5AVl061796@leelou.in.tern>
next in thread | raw e-mail | index | archive | help
>Number: 41576 >Category: standards >Synopsis: POSIX compliance of ln(1) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 12 04:10:07 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Lukas Ertl >Release: FreeBSD 4.6-STABLE i386 >Organization: Vienna University Computer Center >Environment: System: FreeBSD leelou 4.6-STABLE FreeBSD 4.6-STABLE #0: Wed Aug 7 19:15:13 CEST 2002 le@leelou:/usr/obj/usr/src/sys/LEELOU i386 >Description: When creating symlinks, you can replace the "target file" (if it exists) with the "-f" option to ln(1). If you try to replace an existing symlink which points to a directory with "ln -sf ..." the symlink doesn't change but a new symlink is created in the directory that is already symlinked, so you have to explicitly specify the "-h" option to work on the symlink. The ln(1)-manpage says that the -h option is, along with others, non-standard and their use in scripts in not recommended. According to IEEE Std 1003.1-2001 (``POSIX.1''), which only defines the "-f" and "-s" options, if you are using "-f" the target file should be unlinked, and this doesn't work on FreeBSD. although the ln(1)-manpage explicitly states that the ln utility conforms to IEEE Std 1003.1-2001 (``POSIX.1''). >How-To-Repeat: cd /tmp mkdir foo bar ln -s foo bla ### now /tmp/bla symlinks to /tmp/foo ln -sf bar bla ### replace /tmp/bla to point to /tmp/bar, doesn't work >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208121105.g7CB5AVl061796>