link -- create a link to a file


#include <unistd.h>

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


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

Need Not Follow Symlinks

POSIX 1003.1-2001 (ISO/IEC 9945-2003) 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-2001 (ISO/IEC 9945-2003) 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.