-1
test -x
从 /etc/cron.daily/logrotate是做什么的?命令测试-x在Ubuntu下做什么?
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf
它测试是否已经执行文件/ usr/sbin/logrotate?
test -x
从 /etc/cron.daily/logrotate是做什么的?命令测试-x在Ubuntu下做什么?
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf
它测试是否已经执行文件/ usr/sbin/logrotate?
test -x /path/to/file
它检查是否file
存在是可执行当前用户
man test
键入谷歌,它会找到你的手册页,上面写着这样的:
'-x file'
True if file is executable.
参见: '帮助测试' – Cyrus