Should the pgrep command be available in OS X 10.7.5

No, it's not shipped until 10.8 so you'll need to get it elsewhere for 10.7 and earlier.

Starting with OS X 10.8 Mountain Lion, the pgrep command should be in /usr/bin/.

In a Terminal type the following and press enter.

whereis pgrep

Looking at the contents of the InstallESD.dmg from "Install Mac OS X Lion.app", pgrep is not present.


pgrep is a fairly new addition to OS X. It may not be available in 10.7 I would use pkgutil and check for a package id and install time or the command is not available in your version OS X.

pkgutil --file-info /usr/bin/pgrep