Content-type: text/html Man page of link

link

Section: User Commands (1)
Index Return to Main Contents
 

NAME

link, unlink - Creates an additional directory entry for an existing file  

SYNOPSIS

link file1 file2

unlink file


 

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 exit values of the link command are: The link() system call has succeeded. Too few or too many arguments have been specified. The system call has failed.

The unlink command always returns 0 (Zero).
 

SEE ALSO

Commands:  fsck(8), ln(1)

Functions:  link(2), unlink(2)


 

Index

NAME
SYNOPSIS
DESCRIPTION
NOTES
EXIT STATUS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:43:05 GMT, October 02, 2010