Show detailed metadata for a file.
stat report.txtDisplay detailed metadata about a file or directory.
stat [OPTION]... FILE...Show detailed metadata for a file.
stat report.txtPrint permissions, owner, size and name.
stat -c '%A %U %s %n' report.txt| Option / clause | Description |
|---|---|
-c, --format=FORMAT | Print selected metadata using a format string. |
-f, --file-system | Show filesystem status rather than file status. |
-L, --dereference | Follow symbolic links and report the target. |
-t, --terse | Print information in a concise format. |
--printf=FORMAT | Format output without a trailing newline. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.