1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-30 22:38:23 +01:00
tldr/pages/osx/stat.md

24 lines
420 B
Markdown
Raw Normal View History

2017-10-16 03:02:25 +02:00
# stat
> Display file status.
- Show file properties such as size, permissions, creation and access dates among others:
`stat {{file}}`
- Same as above but verbose (more similar to linux's `stat`):
2017-10-16 03:02:25 +02:00
`stat -x {{file}}`
- Show only octal file permissions:
2017-10-16 03:02:25 +02:00
`stat -f %Mp%Lp {{file}}`
- Show owner and group of the file:
2017-10-16 03:02:25 +02:00
`stat -f "%Su %Sg" {{file}}`
2017-10-16 03:02:25 +02:00
- Show the size of the file in bytes:
2017-10-16 03:02:25 +02:00
`stat -f "%z %N" {{file}}`