linux 打开脚本权限不够?

2025-03-05 00:50:07
推荐回答(1个)
回答1:

此文件非彼文件。

当前路径下有个myprofile.sh, 如要执行

1, $./myprofile.sh            # 相对路径执行

2, $ pwd myprofile.sh    # 查看一下文件的绝对路径。

    $ `pwd myprofile.sh`/myprofile.sh     # 绝对路径执行

而你执行的是根下的脚本:一起学习linux

$ /myprofile.sh    

$ ll /myprofile.sh     # 查看下这个权限,就知道 了。