方法1:
- if grep -qs '/mnt/foo' /proc/mounts; then
- echo "It's mounted."
- else
- echo "It's not mounted."
- fi
方法2:
- if mountpoint -q /mnt/foo
- then
- echo "mounted"
- else
- echo "not mounted"
- fi
方法1:
方法2:
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。