mirror of
https://github.com/sahinakkaya/til.git
synced 2024-11-22 00:29:37 +01:00
TIL: Getting the size of a file
This commit is contained in:
parent
997abace67
commit
f07121706c
6
bash-scripting/getting-the-size-of-a-file.md
Normal file
6
bash-scripting/getting-the-size-of-a-file.md
Normal file
@ -0,0 +1,6 @@
|
||||
You can get the size of a file in bytes with:
|
||||
```
|
||||
stat -c %s file_name
|
||||
# example
|
||||
size=$(stat -c %s $myfile)
|
||||
```
|
Loading…
Reference in New Issue
Block a user