我想尝试一些脚本。
谢谢, 巴拉。
tail /opt/test/some.log | grep 被拒绝
不知道如何将其处理为 if。
谢谢@AndrejPodzimek,
现在,它对我有用。
如果! [ -w /opt/test/some.log ];然后 echo "没有权限写入" 回声“测试”>> /tmp/some.log 菲