The macOS driveinfo Command

Last Web page update: 2/1/2020, referencing driveinfo version 1.0.4

The driveinfo man page provides most of the information needed to use this command. There also is a HTML version of the man page which auto wraps the text. This page discusses addition information not contained in either man page.

A summary, including key features of driveinfo, can be found at the SourceForge driveinfo homepage. The releases of driveinfo can be found at the SourceForge driveinfo files page. An automatic download of the latest release can be started by accessing this SourceForge download link. The driveinfo download is in the form a zip file. This file is automatically expanded to create a folder. The download does not automatically install. The driveinfo command does not need to be installed before using. Assuming the zip file was downloaded to the ~/Downloads folder, driveinfo can be run by typing the following command along with the desired parameters.

~/Downloads/driveinfo-1.0.4/driveinfo

If you wish to install, then enter the following. This will install both the command and the corresponding man page.

sudo ~/Downloads/driveinfo-1.0.4/driveinfo -zcp

After installing, the follow files should have been created or verified.

/usr/local/bin/driveinfo
/usr/local/share/man/man8/driveinfo.8

The following commands can be used to uninstall driveinfo.

sudo rm /usr/local/bin/driveinfo
sudo rm /usr/local/share/man/man8/driveinfo.8
sudo rm -f /usr/local/share/man/whatis
sudo /usr/libexec/makewhatis /usr/local/share/man

The driveinfo command is a bash script. This script verifies itself by performing a 32 bit cyclic redundancy check (CRC32). If modifications are made to the script, then an error message with the new CRC32 value will be produced. This error message can be eliminated by using the i option or replacing the CRC32 value at the end of the script. The i option can also be placed in the DRIVEINFO_OPTIONS environment variable.

The driveinfo source git repository contains the script files driveinfo, math and help. Both the math and help files are merged into the driveinfo file to create the released single driveinfo file. The git repository can be accessed from either SourceForge or GitHub.