https://github.com/gentooxativa/json-disk
A simple C application to get the information about mountpoints and free space with JSON output.
https://github.com/gentooxativa/json-disk
c json linux linux-app linux-shell
Last synced: about 1 month ago
JSON representation
A simple C application to get the information about mountpoints and free space with JSON output.
- Host: GitHub
- URL: https://github.com/gentooxativa/json-disk
- Owner: GentooXativa
- License: gpl-3.0
- Created: 2017-09-03T06:54:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-03T07:54:40.000Z (almost 9 years ago)
- Last Synced: 2025-01-28T19:47:56.502Z (over 1 year ago)
- Topics: c, json, linux, linux-app, linux-shell
- Language: C
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json-disk
A simple C application to get the information about mountpoints and free space with JSON output.
# Usage
```bash
Usage: json_disk [-h] [-m]
-h Show this help
-m Use /etc/mtab instead of /etc/fstab
```
# Example output
```json
[
{
"mountpoint": "/",
"free": 1092571136,
"total": 20506800128,
"type": "ext4",
"fsname": "/dev/md2",
"fsopts": "errors=remount-ro,relatime"
},
{
"mountpoint": "/srv",
"free": 304944160768,
"total": 3916700098560,
"type": "ext4",
"fsname": "/dev/md3",
"fsopts": "defaults,relatime"
},
{
"mountpoint": "swap",
"free": 304944160768,
"total": 3916700098560,
"type": "swap",
"fsname": "/dev/sda4",
"fsopts": "defaults"
},
{
"mountpoint": "swap",
"free": 304944160768,
"total": 3916700098560,
"type": "swap",
"fsname": "/dev/sdb4",
"fsopts": "defaults"
},
{
"mountpoint": "swap",
"free": 304944160768,
"total": 3916700098560,
"type": "swap",
"fsname": "/dev/sdc4",
"fsopts": "defaults"
},
{
"mountpoint": "/dev/shm",
"free": 8401739776,
"total": 8401739776,
"type": "tmpfs",
"fsname": "tmpfs",
"fsopts": "defaults"
}
]
```