开发者

Executing linux commands with c

Is there any way to execu开发者_如何学Cte Linux commands with c without using execlp(), like predefined functions or something else.

Thanks.


Use system() or popen() if you need the commands output.


system(const char *command); sounds to be what you want


You can use system. It execute the command, but take care since it invoke a shell to interpret the command (breaking argument list on space, ...).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜