Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

scriptingosx/diskspace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

13 Commits

Repository files navigation

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] [<volume-path>]
ARGUMENTS:
 <volume-path> 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.

About

macOS command line tool to return the available disk space on APFS volumes

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

Languages

AltStyle によって変換されたページ (->オリジナル) /