Un outil pour savoir si une commande est posix - retour accueil
git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |
readlink.html (8765B)
1 <!-- Copyright 2001-2024 IEEE and The Open Group, All Rights Reserved --> 2 <!DOCTYPE HTML> 3 <html lang="en"> 4 <head> 5 <meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.8.0"> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 7 <link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group rhtm tool v1.2.4 --> 8 <!-- Copyright (c) 2001-2024 The Open Group, All Rights Reserved --> 9 <title>readlink</title> 10 </head> 11 <body bgcolor="white"> 12 <div class="NAVHEADER"> 13 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 14 <tr class="nav"> 15 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/read.html" accesskey="P"><<< 16 Previous</a></td> 17 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 18 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/realpath.html" accesskey="N">Next 19 >>></a></td> 20 </tr> 21 </table> 22 <hr align="left" width="100%"></div> 23 <script language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> 24 <center><font size="2">The Open Group Base Specifications Issue 8<br> 25 IEEE Std 1003.1-2024<br> 26 Copyright © 2001-2024 The IEEE and The Open Group</font></center> 27 <hr size="2" noshade> 28 <a name="top" id="top"></a> <a name="readlink" id="readlink"></a> <a name="tag_20_101" id="tag_20_101"></a><!-- readlink --> 29 <h4 class="mansect"><a name="tag_20_101_01" id="tag_20_101_01"></a>NAME</h4> 30 <blockquote>readlink — display the contents of a symbolic link</blockquote> 31 <h4 class="mansect"><a name="tag_20_101_02" id="tag_20_101_02"></a>SYNOPSIS</h4> 32 <blockquote class="synopsis"> 33 <p><code><tt>readlink</tt> <b>[</b><tt>-n</tt><b>]</b> <i>file</i></code></p> 34 </blockquote> 35 <h4 class="mansect"><a name="tag_20_101_03" id="tag_20_101_03"></a>DESCRIPTION</h4> 36 <blockquote> 37 <p>If the <i>file</i> operand names a symbolic link, the <i>readlink</i> utility shall not follow the symbolic link when resolving 38 <i>file</i> and shall write the contents of the symbolic link to standard output. If the <b>-n</b> option is not specified, the 39 output to standard output shall be followed by a <newline> character.</p> 40 <p>If <i>file</i> does not name a symbolic link, <i>readlink</i> shall write a diagnostic message to standard error and exit with 41 non-zero status.</p> 42 </blockquote> 43 <h4 class="mansect"><a name="tag_20_101_04" id="tag_20_101_04"></a>OPTIONS</h4> 44 <blockquote> 45 <p>The <i>readlink</i> utility shall conform to XBD <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax 46 Guidelines</i></a> .</p> 47 <p>The following option shall be supported:</p> 48 <dl compact> 49 <dd></dd> 50 <dt><b>-n</b></dt> 51 <dd>Do not output a trailing <newline> character.</dd> 52 </dl> 53 </blockquote> 54 <h4 class="mansect"><a name="tag_20_101_05" id="tag_20_101_05"></a>OPERANDS</h4> 55 <blockquote> 56 <p>The following operand shall be supported:</p> 57 <dl compact> 58 <dd></dd> 59 <dt><i>file</i></dt> 60 <dd>A pathname of a symbolic link to be read.</dd> 61 </dl> 62 </blockquote> 63 <h4 class="mansect"><a name="tag_20_101_06" id="tag_20_101_06"></a>STDIN</h4> 64 <blockquote> 65 <p>Not used.</p> 66 </blockquote> 67 <h4 class="mansect"><a name="tag_20_101_07" id="tag_20_101_07"></a>INPUT FILES</h4> 68 <blockquote> 69 <p>None.</p> 70 </blockquote> 71 <h4 class="mansect"><a name="tag_20_101_08" id="tag_20_101_08"></a>ENVIRONMENT VARIABLES</h4> 72 <blockquote> 73 <p>The following environment variables shall affect the execution of <i>readlink</i>:</p> 74 <dl compact> 75 <dd></dd> 76 <dt><i>LANG</i></dt> 77 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href= 78 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization 79 variables used to determine the values of locale categories.)</dd> 80 <dt><i>LC_ALL</i></dt> 81 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd> 82 <dt><i>LC_CTYPE</i></dt> 83 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as 84 opposed to multi-byte characters in arguments and input files).</dd> 85 <dt><i>LC_MESSAGES</i></dt> 86 <dd><br> 87 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.</dd> 88 <dt><i>NLSPATH</i></dt> 89 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 90 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border= 91 "0"></dd> 92 </dl> 93 </blockquote> 94 <h4 class="mansect"><a name="tag_20_101_09" id="tag_20_101_09"></a>ASYNCHRONOUS EVENTS</h4> 95 <blockquote> 96 <p>Default.</p> 97 </blockquote> 98 <h4 class="mansect"><a name="tag_20_101_10" id="tag_20_101_10"></a>STDOUT</h4> 99 <blockquote> 100 <p>See DESCRIPTION.</p> 101 </blockquote> 102 <h4 class="mansect"><a name="tag_20_101_11" id="tag_20_101_11"></a>STDERR</h4> 103 <blockquote> 104 <p>The standard error shall be used only for diagnostic messages.</p> 105 </blockquote> 106 <h4 class="mansect"><a name="tag_20_101_12" id="tag_20_101_12"></a>OUTPUT FILES</h4> 107 <blockquote> 108 <p>None.</p> 109 </blockquote> 110 <h4 class="mansect"><a name="tag_20_101_13" id="tag_20_101_13"></a>EXTENDED DESCRIPTION</h4> 111 <blockquote> 112 <p>None.</p> 113 </blockquote> 114 <h4 class="mansect"><a name="tag_20_101_14" id="tag_20_101_14"></a>EXIT STATUS</h4> 115 <blockquote> 116 <p>The following exit values shall be returned:</p> 117 <dl compact> 118 <dd></dd> 119 <dt> 0</dt> 120 <dd>Successful completion.</dd> 121 <dt>>0</dt> 122 <dd>An error occurred.</dd> 123 </dl> 124 </blockquote> 125 <h4 class="mansect"><a name="tag_20_101_15" id="tag_20_101_15"></a>CONSEQUENCES OF ERRORS</h4> 126 <blockquote> 127 <p>Default.</p> 128 </blockquote> 129 <hr> 130 <div class="box"><em>The following sections are informative.</em></div> 131 <h4 class="mansect"><a name="tag_20_101_16" id="tag_20_101_16"></a>APPLICATION USAGE</h4> 132 <blockquote> 133 <p>None.</p> 134 </blockquote> 135 <h4 class="mansect"><a name="tag_20_101_17" id="tag_20_101_17"></a>EXAMPLES</h4> 136 <blockquote> 137 <p>None.</p> 138 </blockquote> 139 <h4 class="mansect"><a name="tag_20_101_18" id="tag_20_101_18"></a>RATIONALE</h4> 140 <blockquote> 141 <p>The <i>readlink</i> utility was added because using <a href="../utilities/ls.html"><i>ls</i></a> <b>-l</b> to obtain the 142 contents of a symbolic link is difficult if the output includes more than one occurrence of the string <tt>" -> "</tt>.</p> 143 <p>The <b>-f</b> option found in many implementations was not included, as the <a href= 144 "../utilities/realpath.html"><i>realpath</i></a> utility provides equivalent functionality with a choice of behaviors.</p> 145 </blockquote> 146 <h4 class="mansect"><a name="tag_20_101_19" id="tag_20_101_19"></a>FUTURE DIRECTIONS</h4> 147 <blockquote> 148 <p>None.</p> 149 </blockquote> 150 <h4 class="mansect"><a name="tag_20_101_20" id="tag_20_101_20"></a>SEE ALSO</h4> 151 <blockquote> 152 <p><a href="../utilities/ln.html#"><i>ln</i></a> , <a href="../utilities/ls.html#"><i>ls</i></a> , <a href= 153 "../utilities/realpath.html#tag_20_102"><i>realpath</i></a></p> 154 <p>XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> , <a href= 155 "../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax Guidelines</i></a></p> 156 <p>XSH <a href="../functions/readlink.html#"><i>readlink</i></a></p> 157 </blockquote> 158 <h4 class="mansect"><a name="tag_20_101_21" id="tag_20_101_21"></a>CHANGE HISTORY</h4> 159 <blockquote> 160 <p>First released in Issue 8.</p> 161 </blockquote> 162 <div class="box"><em>End of informative text.</em></div> 163 <hr> 164 <p> </p> 165 <a href="#top"><span class="topOfPage">return to top of page</span></a><br> 166 <hr size="2" noshade> 167 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br> 168 POSIX™ is a Trademark of The IEEE.<br> 169 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br> 170 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href= 171 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a> 172 ]</font></center> 173 <hr size="2" noshade> 174 <div class="NAVHEADER"> 175 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 176 <tr class="nav"> 177 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/read.html" accesskey="P"><<< 178 Previous</a></td> 179 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 180 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/realpath.html" accesskey="N">Next 181 >>></a></td> 182 </tr> 183 </table> 184 <hr align="left" width="100%"></div> 185 </body> 186 </html>