Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

unlink(1) [osf1 man page]

link(1) 						      General Commands Manual							   link(1)

NAME
link, unlink - Creates an additional directory entry for an existing file SYNOPSIS
link file1 file2 unlink file STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: link: XCU5.0 unlink: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The link command performs the link() system call to create an additional directory entry for an existing file, file1. In effect, the underlying file then has two names, file1 and file2 (either of these arguments can be a pathname). The old and new entries share equal access rights to the underlying file. The unlink command performs the unlink() system call to remove a link to file created by link. The unlink command removes the directory entry specified by the file parameter and, if the entry is a hard link, decrements the link count of the file referenced by the link. You should be familiar with the link() and unlink() system calls before you use these commands. The link and unlink commands do not issue error messages when the associated system call is unsuccessful. NOTES
The link and unlink commands cannot be used to link and unlink directories. EXIT STATUS
The link and unlink commands both exit with the following: The link() or unlink() system call succeeded. Too few or too many arguments specified. The link() or unlink() system call failed. SEE ALSO
Commands: fsck(8), ln(1) Functions: link(2), unlink(2) link(1)

Check Out this Related Man Page

link(1M)						  System Administration Commands						  link(1M)

NAME
link, unlink - link and unlink files and directories SYNOPSIS
/usr/sbin/link existing-file new-file /usr/xpg4/bin/link existing-file new-file /usr/sbin/unlink file DESCRIPTION
The link and unlink commands link and unlink files and directories. Only super-users can use these commands on directories. Use link to create a new file that points to an existing file. The existing-file and new-file operands specify the existing file and newly-created files. See OPERANDS. link and unlink directly invoke the link(2) and unlink(2) system calls, performing exactly what they are told to do and abandoning all error checking. This differs from the ln(1) command. See ln(1). While linked files and directories can be removed using unlink, it is safer to use rm(1) and rmdir(1) instead. See rm(1) and rmdir(1). /usr/xpg4/bin/link If the existing file being hard linked is itself a symbolic link, then the newly created file (new-file) will be a hard link to the file referenced by the symbolic link, not to the symbolic link object itself (existing-file). OPERANDS
The following operands are supported: existing-file Specifies the name of the existing file to be linked. file Specifies the name of the file to be unlinked. new-file Specifies the name of newly created (linked) file. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of link: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, and NLSPATH. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ /usr/xpg4/bin/link +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWxcu4 | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
ln(1), rm(1), link(2), unlink(2), attributes(5), environ(5), standards(5) SunOS 5.10 9 Oct 2002 link(1M)
Man Page