Merge pull request #986 from ilhan-mstf/feature/linux-disk-size
Adds disk space and disk usage commands to linux.
This commit is contained in:
commit
0bc396c632
15
linux.md
15
linux.md
|
@ -12,6 +12,21 @@ title: Linux
|
|||
|
||||
username ALL=(ALL) NOPASSWD:/sbin/restart whatever
|
||||
|
||||
### Display the amount of available disk space
|
||||
|
||||
```sh
|
||||
df
|
||||
df -h # human-readable format
|
||||
df -a # all filesystems
|
||||
```
|
||||
|
||||
### Display disk usage
|
||||
|
||||
```sh
|
||||
du
|
||||
du -hsx * | sort -rh | head -10 # largest 10 folders
|
||||
```
|
||||
|
||||
### Answer yes in a bash script
|
||||
|
||||
```bash
|
||||
|
|
Loading…
Reference in New Issue