
-d
有时 -d 是指 destination,比如 cp 里的 -d
也可能是指 directory 比如 rm 里的 -d
-f
有时 -f 是指 force,比如 rm cp 里的 -f
也可能是指 filename 比如 grep 里的 -f
-s
和 -d 类似
建议 多使用 --help 看看用法
判断目录是否存在用-d例如: if [ -d /test/test1]then
echo "目录存在"
else
mkdir -p /test/test1
fi
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)