stat [options] file...Arguments explained
- file is the path to inspect.
- -c prints a custom format.
- -f shows filesystem status instead of file status.
Common examples
stat /etc/passwdShows metadata for /etc/passwd, including permissions and timestamps.
stat -c '%a %n' script.shPrints numeric permissions and the filename.
| Field | Details |
|---|---|
| Command | stat |
| Category | File and Folder Operations |
| Primary use | Shows detailed file metadata. |
| Syntax | stat [options] file... |