找回密碼
 註冊
搜索
查看: 2169|回復: 0

[CentOS] 檢查 volume 是否已經被 mount 了

[複製鏈接]
發表於 2018-3-23 10:00:58 | 顯示全部樓層 |閱讀模式
[Bash shell] 純文本查看 複制代碼
if grep -qs '/mnt/foo' /proc/mounts; then
    echo "It's mounted."
else
    echo "It's not mounted."
fi

Reference:
https://serverfault.com/question ... aign=google_rich_qa
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|彩色筆小沛的知識庫

GMT+8, 2024-3-29 09:34 , Processed in 0.016114 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回復 返回頂部 返回列表