Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scriptingosx/diskspace
macOS command line tool to return the available disk space on APFS volumes
https://github.com/scriptingosx/diskspace
apfs command-line-tool disk-space macadmin macos
Last synced: 7 days ago
JSON representation
macOS command line tool to return the available disk space on APFS volumes
- Host: GitHub
- URL: https://github.com/scriptingosx/diskspace
- Owner: scriptingosx
- License: other
- Created: 2021-11-02T15:05:01.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-06T12:10:44.000Z (about 3 years ago)
- Last Synced: 2024-08-02T16:10:12.201Z (3 months ago)
- Topics: apfs, command-line-tool, disk-space, macadmin, macos
- Language: Swift
- Homepage:
- Size: 15.6 KB
- Stars: 158
- Watchers: 9
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# diskspace
![](https://img.shields.io/github/v/release/scriptingosx/diskspace) ![](https://img.shields.io/github/downloads/scriptingosx/diskspace/latest/total) ![](https://img.shields.io/badge/macOS-10.14%2B-success) ![](https://img.shields.io/github/license/scriptingosx/diskspace)
Returns available disk space
With the various APFS features the value for free disk space returned from
tools such as `du` or `df` will not be accurate. This tool uses system
functions to get various measures of available disk space.The 'Important' value matches the free disk space value shown in Finder.
You can get the details from Apple's documentation:
https://developer.apple.com/documentation/foundation/urlresourcekey/checking_volume_storage_capacity
```
USAGE: diskspace [--human-readable] [--available] [--important] [--opportunistic] [--total] []ARGUMENTS:
path to the volume (default: /)OPTIONS:
-H, --human-readable Human readable output using unit suffixes
-a, --available Print only the value of the Available Capacity
-i, --important Print only the value of the Important Capacity
-o, --opportunistic Print only the value of the Opportunistic Capacity
-t, --total Print only the value of the Total Capacity
--version Show the version.
-h, --help Show help information.
```