Check if a file is executable

后端 未结 6 828
粉色の甜心
粉色の甜心 2020-11-27 16:11

I am wondering what\'s the easiest way to check if a program is executable with bash, without executing it ? It should at least check whether the file has execute rights, a

6条回答
  •  再見小時候
    2020-11-27 17:09

    Also seems nobody noticed -x operator on symlinks. A symlink (chain) to a regular file (not classified as executable) fails the test.

提交回复
热议问题