what does command test -x do in ubuntu?

筅森魡賤 提交于 2019-12-02 22:36:02

问题


what does test -x from /etc/cron.daily/logrotate do?

test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf

Does it test if already executing file /usr/sbin/logrotate?


回答1:


test -x /path/to/file

It checks if file exists and is executable by current user




回答2:


Type man test in Google and it will find you a manual page that says this:

'-x file'
     True if file is executable.


来源:https://stackoverflow.com/questions/34704494/what-does-command-test-x-do-in-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!