⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syscalls_18.html

📁 Linux系统调用
💻 HTML
字号:
<!-- This HTML file has been created by texi2html 1.29
     from syscalls.texi on 4 June 1994 -->

<TITLE>Syscall specifications of Linux - link</TITLE>
<P>Go to the <A HREF="syscalls_17.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_17.html">previous</A>, <A HREF="syscalls_19.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_19.html">next</A> section.<P>
<H2><A NAME="SEC18" HREF="syscalls_toc.html#SEC18" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_toc.html#SEC18">link</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int link(const char *<VAR>src</VAR>, const char *<VAR>new</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>src</VAR>: [in] points the the file we want to add a link to.
<P>
<VAR>new</VAR>: [in] points to the path for the new link.
 
<H3>DESCRIPTION</H3>
<P>
Creates a new (hard) link to a file. There is no way to distinguish
the links.
<P>
<H3>RETURN VALUE</H3>
<P>
On success zero is returned. On error, -1 is returned and <CODE>errno</CODE> is
set to one of the following values:
<P>
<UL>
<LI><CODE>EPERM</CODE>: the file system does not support hard links or
<VAR>oldpath</VAR> is the <CODE>.</CODE> or <CODE>..</CODE> entry of a directory.
<LI><CODE>EXDEV</CODE>, <CODE>EFAULT</CODE>, <CODE>EACCESS</CODE>, <CODE>ENAMETOOLONG</CODE>,
<CODE>ENOENT</CODE>, <CODE>ENOTDIR</CODE>, <CODE>ENOMEM</CODE>, <CODE>EROFS</CODE>,
<CODE>EEXIST</CODE>, <CODE>EMLINK</CODE>, <CODE>ELOOP</CODE> and. <CODE>ESPC</CODE>.
</UL>
<P>
<P>Go to the <A HREF="syscalls_17.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_17.html">previous</A>, <A HREF="syscalls_19.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_19.html">next</A> section.<P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -