diff options
author | sobrado <sobrado@openbsd.org> | 2007-09-16 18:13:57 +0000 |
---|---|---|
committer | sobrado <sobrado@openbsd.org> | 2007-09-16 18:13:57 +0000 |
commit | 92b0661456ebd661d6b86a9290e42a8293de8951 (patch) | |
tree | 9d7005d588f5197ea1f4cb69207dd852075ac536 /bin/ln | |
parent | Another mem leak plugged. With help from Igor Zinovi. ok millert@ (diff) | |
download | wireguard-openbsd-92b0661456ebd661d6b86a9290e42a8293de8951.tar.xz wireguard-openbsd-92b0661456ebd661d6b86a9290e42a8293de8951.zip |
"source" and "target" can be either files or directories;
cp(1) and ln(1) must have a synopsis consistent with mkdir(1),
mv(1), rmdir(1) and others
ok jmc@, millert@, otto@
Diffstat (limited to 'bin/ln')
-rw-r--r-- | bin/ln/ln.1 | 26 | ||||
-rw-r--r-- | bin/ln/ln.c | 8 |
2 files changed, 17 insertions, 17 deletions
diff --git a/bin/ln/ln.1 b/bin/ln/ln.1 index b58c8456de7..570a0528f5f 100644 --- a/bin/ln/ln.1 +++ b/bin/ln/ln.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ln.1,v 1.24 2007/05/31 19:19:14 jmc Exp $ +.\" $OpenBSD: ln.1,v 1.25 2007/09/16 18:13:57 sobrado Exp $ .\" $NetBSD: ln.1,v 1.10 1995/07/25 19:37:04 jtc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 @@ -33,7 +33,7 @@ .\" .\" @(#)ln.1 8.2 (Berkeley) 12/30/93 .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: September 16 2007 $ .Dt LN 1 .Os .Sh NAME @@ -42,12 +42,12 @@ .Sh SYNOPSIS .Nm ln .Op Fl fhns -.Ar sourcefile -.Op Ar targetfile +.Ar source +.Op Ar target .Nm ln .Op Fl fs -.Ar sourcefile ...\& -.Op Ar targetdir +.Ar source ...\& +.Op Ar directory .Sh DESCRIPTION The .Nm @@ -105,21 +105,21 @@ non-existent files. Given one or two arguments, .Nm creates a link to an existing file -.Ar sourcefile . +.Ar source . If -.Ar targetfile +.Ar target is given, the link has that name; -.Ar targetfile +.Ar target may also be a directory in which to place the link. Otherwise, it is placed in the current directory. If only the directory is specified, the link will be made to the last component of -.Ar sourcefile . +.Ar source . .Pp Given more than two arguments, .Nm makes links in -.Ar targetdir +.Ar directory to all the named source files. The links made will have the same name as the files being linked to. .Pp @@ -208,7 +208,7 @@ utility appeared in .At v3 . .Sh CAVEATS Since the -.Ar sourcefile -must have its link count incremented, a hard link cannot be created to a +.Ar source +file must have its link count incremented, a hard link cannot be created to a file which is flagged immutable or append-only (see .Xr chflags 1 ) . diff --git a/bin/ln/ln.c b/bin/ln/ln.c index c042ac87ebe..25a8386282c 100644 --- a/bin/ln/ln.c +++ b/bin/ln/ln.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ln.c,v 1.15 2007/07/31 03:03:12 ray Exp $ */ +/* $OpenBSD: ln.c,v 1.16 2007/09/16 18:13:57 sobrado Exp $ */ /* $NetBSD: ln.c,v 1.10 1995/03/21 09:06:10 cgd Exp $ */ /* @@ -40,7 +40,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)ln.c 8.2 (Berkeley) 3/31/94"; #else -static const char rcsid[] = "$OpenBSD: ln.c,v 1.15 2007/07/31 03:03:12 ray Exp $"; +static const char rcsid[] = "$OpenBSD: ln.c,v 1.16 2007/09/16 18:13:57 sobrado Exp $"; #endif #endif /* not lint */ @@ -204,8 +204,8 @@ usage(void) extern char *__progname; (void)fprintf(stderr, - "usage: %s [-fhns] sourcefile [targetfile]\n" - " %s [-fs] sourcefile ... [targetdir]\n", + "usage: %s [-fhns] source [target]\n" + " %s [-fs] source ... [directory]\n", __progname, __progname); exit(1); } |