Skip to content

Commit

Permalink
Added a basic TIL on the stat command
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbn committed Jan 7, 2025
1 parent bdca0db commit f999519
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@
- [Get your shell command explained visually](shell/explain_shell.com.md)
- [Nifty aliases](shell/nifty_aliases.md)
- [Testing Using Bats](shell/testing_using_bats.md)
- [stat](shell/stat.md)

<a id="shellcheck"></a>
### shellcheck - a linter for shell scripts
Expand Down
13 changes: 13 additions & 0 deletions shell/stat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# stat

Is a tool that you come across once in while.

`stat` has a format, where these are the expressions resemble `printf`.

> If no options are specified, the default format is "%d %i %Sp %l %Su %Sg %r %z \"%Sa\" \"%Sm\" \"%Sc\" \"%SB\" %k %b %#Xf %N".
>
```shell
stat /tmp/bar
0 78852 -rw-r--r-- 1 root wheel 0 0 "Jul 8 10:26:03 2004" "Jul 8 10:26:03 2004" "Jul 8 10:28:13 2004" "Jan 1 09:00:00 1970" 16384 0 0 /tmp/bar
```

0 comments on commit f999519

Please sign in to comment.