link

Name

link -- create a link to a file

Synopsis

#include <unistd.h>

int link(const char * path1, const char * path2);

Description

The link() function shall behave as specified in POSIX 1003.1-2008 (ISO/IEC 9945-2009), except with differences as listed below.

Need Not Follow Symlinks

POSIX 1003.1-2008 (ISO/IEC 9945-2009) specifies that pathname resolution shall follow symbolic links during pathname resolution unless the function is required to act on the symbolic link itself, or certain arguments direct that the function act on the symbolic link itself. The link() function in POSIX 1003.1-2008 (ISO/IEC 9945-2009) contains no such requirement to operate on a symbolic link. However, a conforming LSB implementation need not follow a symbolic link for the path1 argument.