2016-01-10 19 views
-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?

+1

参见: '帮助测试' – Cyrus

回答

0
test -x /path/to/file 

它检查是否file存在可执行当前用户

0

man test键入谷歌,它会找到你的手册页,上面写着这样的:

'-x file' 
    True if file is executable.