-
test -e /root/install.log
等價(jià)于
[ -e /root/install.log ]
查看全部 -
-d
-e
-f
查看全部 -
```sh
$ ls -alth
$ ls -i
```
查看全部 -
ln 硬連接
ln -s 軟連接 ? --soft
```sh
# -ef => --equal --file
# 文件相等比較,檢測(cè)文件是否是一個(gè)軟鏈接 ?
[ ./student.sh -ef ./soft ] && [ -L ./soft ] && echo yes || echo no
[ ./student.sh -ef ./hard ] && [ -L ./hard ] && echo yes || echo no
```
https://github.com/xgqfrms/linux-shell-script-programming/assets/7291672/94ce2289-e74a-4f69-a33a-54dee716ae04

http://idcbgp.cn/qadetail/337388
查看全部 -
inode
查看全部 -
awk
rate=$( df -h |grep "/dev/sda1" | awk '{ print $5 }' | cut -d "%" -f 1 )
查看全部 -
df -h
查看全部 -
cut -d "=" -f 2
查看全部 -
env
查看全部 -
then
查看全部 -
test
查看全部 -
and
or
!
查看全部 -
字符串相等 ==
數(shù)值/數(shù)字相等 -eq
查看全部 -
==
-z
-n
&& ||
三元運(yùn)算符
查看全部 -
gt: greater than 大于
ge: greater than or equal 大于等于
lt: less than 小于
le: less than or equal 小于等于
查看全部
舉報(bào)