Nos mandan un artículo sobre como invocar comandos de shell desde PHP y dan la referencia a otro artículo titulado Command-line PHP? Yes, you can!:
Learn how to better integrate scripts with command-line tools. Examine using shell_exec(), exec(), passthru(), and system(); safely passing information to the command line; and safely retrieving information from it. See how to integrate closely with underlying shell commands and folding any return values into your interfaces and processes.