STAT(1) BSD General Commands Manual STAT(1)
NAME
readlink, stat -- display file status
SYNOPSIS
stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file ...]
readlink [-n] [file ...]
DESCRIPTION
The stat utility displays information about the file pointed to by file.
Read, write or execute permissions of the named file are not required,
but all directories listed in the path name leading to the file must be
searchable. If no argument is given, stat displays information about the
file descriptor for standard input.
When invoked as readlink, only the target of the symbolic link is
printed. If the given argument is not a symbolic link, readlink will
print nothing and exit with an error.
The information displayed is obtained by calling lstat(2) with the given
argument and evaluating the returned structure.
The options are as follows:
-F As in ls(1), display a slash (`/') immediately after each path-
name that is a directory, an asterisk (`*') after each that is
executable, an at sign (`@') after each symbolic link, a percent
sign (`%') after each whiteout, an equal sign (`=') after each
socket, and a vertical bar (`|') after each that is a FIFO. The
use of -F implies -l.
-f format
Display information using the specified format. See the FORMATS
section for a description of valid formats.
-L Use stat(2) instead of lstat(2). The information reported by
stat will refer to the target of file, if file is a symbolic
link, and not to file itself.
-l Display output in ls -lT format.
-n Do not force a newline to appear at the end of each piece of out-
put.
-q Suppress failure messages if calls to stat(2) or lstat(2) fail.
When run as readlink, error messages are automatically sup-
pressed.
-r Display raw information. That is, for all the fields in the stat
structure, display the raw, numerical value (for example, times
in seconds since the epoch, etc.).
-s Display information in ``shell output'', suitable for initializ-
ing variables.
-t timefmt
Display timestamps using the specified format. This format is
passed directly to strftime(3).
-x Display information in a more verbose way as known from some
Linux distributions.
Le 9 juil. 2015 � 13:46, Thierry Goubier a �crit :