diff options
author | keramida <keramida@FreeBSD.org> | 2008-06-06 08:27:59 +0000 |
---|---|---|
committer | keramida <keramida@FreeBSD.org> | 2008-06-06 08:27:59 +0000 |
commit | fd86b4a48ca1d0148f4138ce73d3b089322b77de (patch) | |
tree | 5aa2c4a64221c496c50b6af2d98443e86ef6dc35 /bin/ln/ln.1 | |
parent | 0292737640c94ce34729f6d1360c3d6c1a05ccff (diff) | |
download | FreeBSD-src-fd86b4a48ca1d0148f4138ce73d3b089322b77de.zip FreeBSD-src-fd86b4a48ca1d0148f4138ce73d3b089322b77de.tar.gz |
Add a -w warning flag to ln(1). When the -w option is enabled,
ln(1) checks to see if the source of a symlink, i.e. the file it
should point to actually exists. The default is the old ln
behavior, that does not check, to avoid surprising people who may
be using ln(1) in scripts or other non-interactive places.
PR: bin/7265
Submitted by: Joel Ray Holveck, detlev!joelh at mail.camalott.com
MFC after: 2 weeks
Diffstat (limited to 'bin/ln/ln.1')
-rw-r--r-- | bin/ln/ln.1 | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/ln/ln.1 b/bin/ln/ln.1 index e6ac24a..7ae4ea8 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 February 14, 2006 +.Dd June 6, 2008 .Dt LN 1 .Os .Sh NAME @@ -42,13 +42,13 @@ .Sh SYNOPSIS .Nm .Op Fl s Op Fl F -.Op Fl f | i +.Op Fl f | iw .Op Fl hnv .Ar source_file .Op Ar target_file .Nm .Op Fl s Op Fl F -.Op Fl f | i +.Op Fl f | iw .Op Fl hnv .Ar source_file ... .Ar target_dir @@ -79,6 +79,8 @@ then unlink it so that the link may occur. .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 @@ -134,6 +136,8 @@ Create a symbolic link. Cause .Nm to be verbose, showing files as they are processed. +.It Fl w +Warn if the source of a symbolic link does not currently exist. .El .Pp By default, @@ -194,9 +198,10 @@ operation using the two passed arguments. The .Fl h , .Fl i , -.Fl n -and +.Fl n , .Fl v +and +.Fl w options are non-standard and their use in scripts is not recommended. They are provided solely for compatibility with other .Nm |