Check and install updates via terminal on OSX

OSX

List:

softwareupdate -l

Install:

sudo softwareupdate -ia

From: http: //osxdaily.com/2011/01/13/install-mac-os-x-software-updates