Or system2, which is preferable in many cases.
Differences are:
Unlike system, command is always quoted by shQuote, so it must be a single command without arguments.
...
system2 is a more portable and flexible interface than system. It allows redirection of output without needing to invoke a shell on Windows, a portable way to set environment variables for the execution of command, and finer control over the redirection of stdout and stderr. Conversely, system (and shell on Windows) allows the invocation of arbitrary command lines.