Linux C system()函数

 如果在Linux Terminal 里面 man system 大家可以看到system()函数的用法,非常简单:函数声明如下:

int system(const char *command);

  函数失败则返回-1,成功后返回0。

  例:

system("echo hello > hello.txt") /*将hello 写入到hello.txt*/
原文地址:https://www.cnblogs.com/yongjiuzhizhen/p/3430707.html