Verify and Repair Disk Permissions via Terminal – macOS

Verify Permissions
diskutil verifyPermissions /

Repair Permissions
diskutil repairPermissions /

Verify and Repair Volume via Terminal (Mac OS X)

Launch Terminal from your Dock, Utilities folder, or via an app launcher like Alfred. Once launched, type or paste in the following command.

diskutil verifyVolume [drive name]

So, for your main hard drive, you could type or paste in something like:

diskutil verifyVolume /

Or, if you have an external drive attached, you can type or paste in the following:

diskutil verifyvolume /Volumes/[drive name]/

So for an external drive named “BackupStuff” you would enter:

diskutil verifyvolume /Volumes/BackupStuff/

If you see no messages, then you can assume that diskutil hasn’t found any errors, and you can move on. If, however, you get an error like “The volume Macintosh HD was found corrupt and needs to be repaired,” then you can repair the drive using diskutil as well.

To repair the drive, you can issue the following command into Terminal:

diskutil repairvolume /

Or, for that external drive as above:

diskutil repairvolume /Volumes/BackupStuff/