看板 LinuxDev 關於我們 聯絡資訊
請問如何使用c/c++ show 出目前系統掛載的硬碟呢? 目前我的作法是parse 外部命令 mount的輸出 不知道有沒有更好或不需要靠外部命令達到這功能呢 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.42.29.114
honercek:df.c http://tinyurl.com/3rjj3ks 10/15 23:59
xatier:system("df"); ? 10/16 00:10
troylee:/proc/mounts 10/16 00:25
afafaf:謝謝 但只有df.c是不用用到外部呼叫的 10/16 21:43
troylee:讀 /proc/mounts 這個也不用外部呼叫吧? 10/17 01:02
qrtt1:everything is file 10/17 01:18