Skip to content

Commit 45bfe6d

Browse files
author
Vladimir Kotal
committed
mention readlink command
1 parent b352205 commit 45bfe6d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

file-api.tex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,14 @@
974974
end up with a \emph{broken link}.
975975
\item \texttt{readlink} is useful in the situation where you want to
976976
\texttt{unlink} the symlink's target.
977+
\item On some systems (e.g. macOS) there is a \texttt{readlink} command that
978+
will display symlink target:
979+
\begin{verbatim}
980+
$ ls -l /etc/aliases
981+
lrwxr-xr-x 1 root wheel 15 Oct 24 2017 /etc/aliases -> postfix/aliases
982+
$ readlink /etc/aliases
983+
postfix/aliases
984+
\end{verbatim}
977985
\item \emph{\texttt{bufsz}} is typically set as 1 byte less than the buffer
978986
size to accommodate the terminating \texttt{NULL} character.
979987
\item See \example{readlink/readlink.c} and fix the problem therein.

0 commit comments

Comments
 (0)