• Stars
    star
    158
  • Rank 237,131 (Top 5 %)
  • Language
    Swift
  • License
    Other
  • Created about 3 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

DownloadFullInstaller

macOS application written in SwiftUI that downloads installer pkgs for the Install macOS Big Sur application.
Swift
789
star
2

desktoppr

Simple command line tool to set the desktop picture on macOS
Swift
285
star
3

quickpkg

wrapper for pkgbuild to quickly build simple packages from an installed app, a dmg or zip archive.
Shell
253
star
4

mac-zsh-completions

macOS specific additional completion definitions for Zsh.
Shell
183
star
5

fetch-installer-pkg

A tool to download the a pkg installer for the Install macOS Big Sur app from Apple's softwareupdate servers
Python
166
star
6

pkgcheck

Script to check installer pkgs for deprecated runtime calls
Shell
97
star
7

PrefsTool

Python
66
star
8

ScriptPackages

Sample scripts to build some simple macOS installer pkgs
Shell
31
star
9

PackagesForAppleAdministrators

Resources and Scripts for the iBook: Packages for Apple Administrators
Shell
31
star
10

swift-prefs

Some tools to work with macOS preferences/defaults/settings
Swift
31
star
11

profiletool

A tool to help manipulate macOS configuration profiles
Python
27
star
12

PR3ForAppleAdmins

Resources and example files for the Book "Property Lists, Preferences and Profiles for Apple Administrators"
Python
24
star
13

GNU-bash-mac-installer

Downloads and builds a Mac package installer for GNU bash 5
Shell
23
star
14

dotfiles

repository for my profile files
Shell
23
star
15

AutomationForAdmins

Python
16
star
16

RemindersCLITool

A command line tool to access OS X's Reminders application.
AppleScript
13
star
17

ThingsCLITool

Command line tool for Things GTD app
AppleScript
13
star
18

BuildShellcheckPkg

Script to build the shellcheck binary and a macOS installer pkg
Shell
11
star
19

terminalAndShellBookResources

Resources for the Book "macOS Terminal and shell"
10
star
20

SwiftAPITutorial

Sample code for my Swift Jamf API tutorial
Swift
10
star
21

CustomToolPathInstaller

Shell
10
star
22

SayThis-SwiftUI

Sample Code for my "Build a macOS Application to Run a Shell Command with Xcode and SwiftUI)"
Swift
9
star
23

ManageMacs

A wiki for Mac Sysadmins
8
star
24

AlphabetUserPicture

Shell
7
star
25

colortool

Swift
6
star
26

recipeutil

a tool to help manipulate recipes for autopkg
Python
6
star
27

SayThis-AppKit

Sample for my Xcode for Apple Admins articles here: http://scriptingosx.com/2016/04/build-an-application-to-run-a-shell-command-in-xcode-and-swift-part-1/ and here: http://scriptingosx.com/2016/05/build-an-application-to-run-a-shell-command-in-xcode-and-swift-part-2/
Swift
6
star
28

InstallerPATH

Shell
5
star
29

plaid

Swift
3
star
30

MunkiScripts

A collection of useful scripts for Munki.
3
star
31

swift-prf

Sample code for "Build a notarized package with a Swift Package Manager executable"
Shell
2
star
32

MSA-Demo-Chooser

This is the source code for my sample project in my MacSysAdmin Conference 2021 presentation.
Swift
2
star
33

PackagesForAppleAdmins

2
star
34

autopkg_recipes

Please note this repository has moved! go to autopkg/scriptingosx instead!
Python
2
star
35

autopkg_processors

Python
1
star