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

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

[複製鏈接]
發表於 2018-3-23 10:00:58 | 顯示全部樓層 |閱讀模式
[mw_shl_code=bash,false]if grep -qs '/mnt/foo' /proc/mounts; then
    echo "It's mounted."
else
    echo "It's not mounted."
fi[/mw_shl_code]
Reference:
https://serverfault.com/question ... aign=google_rich_qa
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

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

GMT+8, 2024-11-21 16:54 , Processed in 0.018947 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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