4 ms·
FWIW, POSIX specifies the ls output format for -l and several other flags. For example, If the -l option is specified, the following information shall be w
by wahern 8y ago
FWIW, POSIX specifies the ls output format for -l and several other flags. For example,
If the -l option is specified, the following information
shall be written for files other than character special and
block special files:
"%s %u %s %s %u %s %s\n", <file mode>, <number of links>,
<owner name>, <group name>, <size>, <date and time>,
<pathname>
There's no stat command in POSIX. More practically, the BSD and GNU versions of stat are completely incompatible. If you want to query a file's size or other metadata from a portable shell script, you need to parse the output of ls.