popen函數

popen執行完後,讀取內容 #include <stdio.h> #include <string.h> int main(void) { FILE *fp = NULL; char buf[10240] = {0}; fp = popen(「ls -al」,「r」); if(fp == NULL){ return 0; } fread(buf, 10240, 1, fp); printf("%
相關文章
相關標籤/搜索