shell - 为什么以不同方式运行脚本时需要许可?

标签 shell terminal

我有一个 python 脚本,当我在终端中运行时:

py filename.py

这很好用。但是用这种风格:

./filename.py

我收到权限被拒绝错误。知道为什么吗?提前致谢。

最佳答案

我的猜测是python本身有-x(可执行)权限,但是filename.py没有

关于shell - 为什么以不同方式运行脚本时需要许可?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14654135/

相关文章:

linux - 如何在不键入 bash 的情况下运行 shell 脚本(bash 命令错误 :mapfile not found)

Android - 运行用 CCTools 编译的命令行程序

c - 如何关闭应用程序本身和终端?

linux - 文件和路径列表分隔符 :

bash - curl 获取请求参数列表太长

linux - 如何编写 shell 脚本从我的密码文件中输入无线连接密码?

php - 无法通过 shell 在 CentOS 7 上安装 phpMyAdmin

linux - 不同终端的不同 nCurses 行为

python - 在新的终端窗口中打印

bash - 如何在 shell 脚本中获取 INI 值?