PTT
Submit
Submit
选择语言
正體中文
简体中文
PTT
Linux
[问题] 如何在script中确定mount有成功
楼主:
LIAR
(玻璃做的大叔)
2015-05-17 17:09:06
我有一个备份的指令,要在特定的分割区执行,所以第一步要确定mount。
虽然每次上线的的顺序可能变掉,我可以用UUID解决这问题,然后我想到
用grep看mount有没有备份资料夹的文字来确定mount有没有成功:
test -n `mount|grep
作者:
danny8376
(钓到一只猴子@_@)
2015-05-17 17:22:00
`mount|grep --color "on /backup type ext4"`这段不是结果对test不是字串...他会变成test后面的参数
楼主:
LIAR
(玻璃做的大叔)
2015-05-17 18:48:00
啊....是这样啊,那我该怎么办?
作者: mail6543210 (mail6543210)
2015-05-17 19:48:00
用return code, "$?"
作者:
kerwinhui
(kezza)
2015-05-17 21:59:00
直接用 if grep ... /proc/mounts; then...; fi
作者: yvb
2015-05-18 00:42:00
test -n "`mount|grep --color "on /backup type ext4"`"
继续阅读
[问题] 要如何改lsusb连结的硬件资讯?
wtchen
[问题] Postfix自动转信rule
sss5
[问题] Ubuntu php5 source to deb
b60413
[问题] 关于 nginx 自动 urldecode问题
tas72732002
[问题] ubuntu 14.04 samba server的问题
mindforce
Debian Project News - May 12, 2015
fourdollars
[问题] 无法直接从硬盘开机 SUSE 11 SP3
iamjojo
[问题] 如果 raid 上的硬盘坏掉...
Neisseria
[问题] ubuntu mount FreeBSD硬盘
s20119
Re: [TOSSUG] Debian 套件打包工作坊
fourdollars
Links
booklink
Contact Us: admin [ a t ] ucptt.com