summaryrefslogtreecommitdiffstats
path: root/bin/ln
Commit message (Collapse)AuthorAgeFilesLines
* symlink(7): Add lpathconf(2) and *at system calls.jilles2010-04-251-2/+27
| | | | MFC after: 1 week
* symlink(7): The ownership of symlinks is used by the system,jilles2010-04-251-3/+3
| | | | | | | | | in at least three ways, so do not say it is ignored: * who may delete/rename a symlink in a sticky directory * who may do lchflags(2)/lchown(2)/lchmod(2) * whose inode quota is charged MFC after: 1 week
* ln: Allow a trailing slash when creating a link to a directory.jilles2010-04-211-14/+13
| | | | | | | | | | | | | | | | | | | | In the 'ln source... directory' synopsis, the basename of each source determines the name of the created link. Determine this using basename(3) instead of strrchr(..., '/') which is incorrect if the pathname ends in a slash. The patch is somewhat changed to allow for basename(3) implementations that change the passed pathname, and to fix the -w option's checking also. The code to compare directory entries only applies to hard links, which cannot be created to directories using ln. Example: ln -s /etc/defaults/ /tmp This should create a symlink named defaults. PR: 121568 Submitted by: Ighighi MFC after: 1 week
* ln: Refuse deleting a directory entry by hardlinking it to itself.jilles2010-04-171-2/+59
| | | | | | | | | | | | | | Two pathnames refer to the same directory entry iff the directories match and the final components' names match. Example: (assuming file1 is an existing file) ln -f file1 file1 This now fails while leaving file1 intact. It used to delete file1 and then complain it cannot be linked because it is gone. With -i, this error is detected before the question is asked. MFC after: 2 weeks
* Allow creating hard links to symlinks using ln(1).jilles2009-07-192-22/+41
| | | | | | | | 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)
* Clean up a bit of confusing language and improve .Nd.trhodes2009-01-131-4/+9
| | | | | PR: 47818 Reviewed by: keramida
* Unbreak last commit to ln for amd64.keramida2008-06-071-1/+1
| | | | | | | | Cast string precision to `int'. amd64 systems warn about the field precision being `long int' if we don't, and pathnames are normally short enough to fit in an `int'. Noticed by: pav
* Add a -w warning flag to ln(1). When the -w option is enabled,keramida2008-06-062-7/+47
| | | | | | | | | | | 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
* Express in the usage() and SYNOPSIS that -F depends on -s, andru2007-11-172-4/+8
| | | | that -f and -i are exclusive.
* Swap "source"/"target" where appropriate, to match documentation.ru2007-11-171-38/+38
|
* Add '-F' option which allows to delete existing empty directories, whenglebius2006-02-142-8/+50
| | | | | | | creating symbolic links. PR: bin/92149 Submitted by: Eugene Grosbein <eugen grosbein.pp.ru>
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Sync program's usage() with manpage's SYNOPSIS.ru2005-02-091-3/+3
|
* Add the new standard EXIT STATUS section where appropriate.ru2005-01-161-7/+7
| | | | Sort standard sections in the (documented) preferred order.
* /*- or .\"- or #- to begin license clauses.imp2005-01-103-1/+3
|
* Deal with double whitespace.ru2004-07-031-6/+6
|
* Mechanically kill hard sentence breaks.ru2004-07-022-8/+13
|
* Removed trailing whitespace.ru2004-07-021-1/+1
|
* Remove clause 3 from the UCB licenses.markm2004-04-063-12/+0
| | | | OK'ed by: imp, core
* Quiet warnings about copyright[].obrien2003-05-011-2/+2
|
* s/filesystem/file system/ as discussed on -developerstrhodes2002-08-212-5/+5
|
* Claim conformance to 1003.2-1992 instead of 1003.1-2001 due to doubtstjr2002-08-121-1/+1
| | | | | | | raised by Lukas Ertl over symbolic link handling. PR: 41576 MFC after: 1 week
* Fix an easy WARNS.markm2002-07-311-1/+1
|
* Consistently use __FBSDIDobrien2002-06-301-2/+2
|
* Check that snprintf() does not truncate the destination pathname whentjr2002-06-291-1/+6
| | | | linking into a directory.
* ln(1)'s symbolic link handling conforms to IEEE Std. 1003.1-2001, notetjr2002-06-251-1/+1
| | | | this in the Standards section.
* Correctly mark up the final command line arguments with the Ar macro fortjr2002-06-251-2/+2
| | | | the last two synopsis forms.
* Reject options, handle "--" end-of-options marker in link(1).tjr2002-05-301-4/+7
|
* mdoc(7) police: punctuation.ru2002-05-291-3/+3
|
* Note that the lutimes(2) and lchflags(2) syscalls also do not follow symlinks.tjr2002-05-261-13/+16
| | | | | | | Remove incorrect examples. PR: 25016 Submitted by: Martin Kammerhofer, Joshua Goodall
* Add lchmod(2) to the list of syscalls that do not follow symbolic links.tjr2002-05-261-1/+3
|
* Consistancy check s/file system/filesystem/trhodes2002-05-162-4/+4
| | | | Reviewed by: brian
* Add semicolon to empty default case to silence warning.jedgar2002-05-111-0/+1
|
* Fix warnings inspired by lint, a commercial lint and WARNS=4.markm2002-02-221-0/+1
|
* o __P has been reovedimp2002-02-021-11/+6
| | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are.
* Default to WARNS=2. Binary builds that cannot handle this must explicitlyobrien2001-12-041-2/+0
| | | | | | set WARNS=0. Reviewed by: mike
* mdoc(7) police: s/BSD/.Bx/ where appropriate.ru2001-08-141-2/+6
|
* Remove whitespace at EOL.dd2001-07-152-5/+5
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-102-2/+2
|
* WARNS= -> WARNS?=dd2001-06-221-1/+1
| | | | Submitted by: Mike Barcroft <mike@q9media.com>
* Use PATH_MAX in preference to MAXPATHLEN.imp2001-05-291-1/+2
| | | | | Also sort declarations per style(9) (big arrays come last) while I'm in the area.
* Silence WARNS=2 and BDECFLAGS on i386 and alphakris2001-05-202-4/+7
| | | | MFC After: 1 week
* Fixed a typo.ru2001-04-271-1/+1
|
* Put a note that `-h' and `-n' is non-standard and provided only forsobomax2001-04-271-1/+6
| | | | | | compatibility purposes. Prompted by: ru
* Bring in `-h' compatability option and its alias `-n' to match NetBSD and GNUsobomax2001-04-262-14/+53
| | | | | | | semantics. style(9) Reviewed by: Obtained from: NetBSD
* MAN[1-9] -> MAN.ru2001-03-271-2/+1
|
* Note that rmdir(2) does not follow symbolic links.jdp2001-01-241-1/+6
|
* Prepare for mdoc(7)NG.ru2000-12-151-1/+1
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-2/+2
|
* Avoid use of direct troff requests in mdoc(7) manual pages.ru2000-11-101-1/+1
|
OpenPOWER on IntegriCloud