加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

bash – 如何测试给定的路径是否为安装点

发布时间:2020-12-15 09:13:11 所属栏目:安全 来源:网络整理
导读:假设你想测试/ mnt / disk是否为shell脚本中的安装点。 你怎么做到这一点? 我发现在我的Fedora 7有一个mountpoint命令。 从man mountpoint: NAME mountpoint - see if a directory is a mountpointSYNOPSIS /bin/mountpoint [-q] [-d] /path/to/directory
假设你想测试/ mnt / disk是否为shell脚本中的安装点。
你怎么做到这一点?
我发现在我的Fedora 7有一个mountpoint命令。

从man mountpoint:

NAME
       mountpoint - see if a directory is a mountpoint

SYNOPSIS
       /bin/mountpoint [-q] [-d] /path/to/directory
       /bin/mountpoint -x /dev/device

显然它带有sysvinit包,我不知道这个命令是否可用于其他系统。

[root@myhost~]# rpm -qf $(which mountpoint)
sysvinit-2.86-17

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读