Shell获取某路径所在设备的名字

df <your-path>
Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/vdc1      419224580 119587168 299637412  29% /data

参考文献:https://stackoverflow.com/questions/38615464/how-to-get-device-name-on-which-a-file-is-located-from-its-path-in-c

posted @ 2024-09-28 13:40  寻找繁星  阅读(2)  评论(0编辑  收藏  举报