📌  相关文章
📜  bash 检查文件是否可读 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:26.341000             🧑  作者: Mango

代码示例1
FILE="/path/to/some/file"

if [[ -r $FILE && -w $FILE ]]; then
  # do stuff
else
  # file is either not readable or writable or both
fi