diff options
author | jilles <jilles@FreeBSD.org> | 2009-07-19 17:35:23 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2009-07-19 17:35:23 +0000 |
commit | afad68b5dc9dd7ac9e87c87a272c5dad1a689597 (patch) | |
tree | 827b6a2921d9336134d84d2f229b361a97e872af /bin/ln/ln.1 | |
parent | 9c2c634ee9419c063051f0df25be4105938fc170 (diff) | |
download | FreeBSD-src-afad68b5dc9dd7ac9e87c87a272c5dad1a689597.zip FreeBSD-src-afad68b5dc9dd7ac9e87c87a272c5dad1a689597.tar.gz |
Allow creating hard links to symlinks using ln(1).
This implements the POSIX.1-2008 -L and -P flags.
The default remains to create hard links to the target of symlinks.
Approved by: re (kib), ed (mentor)
Diffstat (limited to 'bin/ln/ln.1')
-rw-r--r-- | bin/ln/ln.1 | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/bin/ln/ln.1 b/bin/ln/ln.1 index 2cb2639..6f554c8 100644 --- a/bin/ln/ln.1 +++ b/bin/ln/ln.1 @@ -32,7 +32,7 @@ .\" @(#)ln.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd June 6, 2008 +.Dd July 17, 2009 .Dt LN 1 .Os .Sh NAME @@ -41,13 +41,13 @@ .Nd link files .Sh SYNOPSIS .Nm -.Op Fl s Op Fl F +.Op Fl L | Fl P | Fl s Op Fl F .Op Fl f | iw .Op Fl hnv .Ar source_file .Op Ar target_file .Nm -.Op Fl s Op Fl F +.Op Fl L | Fl P | Fl s Op Fl F .Op Fl f | iw .Op Fl hnv .Ar source_file ... @@ -77,16 +77,6 @@ to a file is one of the differences between a hard and symbolic link. .Pp The options are as follows: .Bl -tag -width flag -.It Fl f -If the target file already exists, -then unlink it so that the link may occur. -(The -.Fl f -option overrides any previous -.Fl i -and -.Fl w -options.) .It Fl F If the target file already exists and is a directory, then remove it so that the link may occur. @@ -105,6 +95,29 @@ The option is a no-op unless .Fl s option is specified. +.It Fl L +When creating a hard link to a symbolic link, +create a hard link to the target of the symbolic link. +This is the default. +This option cancels the +.Fl P +option. +.It Fl P +When creating a hard link to a symbolic link, +create a hard link to the symbolic link itself. +This option cancels the +.Fl L +option. +.It Fl f +If the target file already exists, +then unlink it so that the link may occur. +(The +.Fl f +option overrides any previous +.Fl i +and +.Fl w +options.) .It Fl h If the .Ar target_file |