Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

33
stat Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# stat
> Display file and filesystem information.
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/stat-invocation.html>.
- Display properties about a specific file such as size, permissions, creation and access dates among others:
`stat {{path/to/file}}`
- Display properties about a specific file such as size, permissions, creation and access dates among others without labels:
`stat --terse {{path/to/file}}`
- Display information about the filesystem where a specific file is located:
`stat --file-system {{path/to/file}}`
- Show only octal file permissions:
`stat --format="%a %n" {{path/to/file}}`
- Show the owner and group of a specific file:
`stat --format="%U %G" {{path/to/file}}`
- Show the size of a specific file in bytes:
`stat --format="%s %n" {{path/to/file}}`