无法从任何地方执行文件 [英] Unable to executea a file from anywhere
问题描述
1。我试图从系统中的任何目录执行Bash Shell脚本。为此,我需要让它可以在系统中的任何地方执行。
2.我也错误地添加了我想删除的错误路径,但它没有发生。
请帮忙。
我尝试过:
1.我在$ PATH变量中添加了shell文件的路径。就我而言 -
1. I was trying to execute a Bash Shell Script from any directory in the system. for this I need to make it available to execute anywhere in the system.
2. I also mistakenly added wrong path which I wanted to delete but its not happening.
Please help.
What I have tried:
1. I've added the path of the shell file in the $PATH variable. In my case -
PATH=$PATH:~/bin
。当我试图执行文件时,它说
. And when I tried to execute the file it is saying
没有这样的文件或目录
No such file or directory
。
2.后续文章 - bash - Linux:从$ PATH变量中删除路径 - Stack Overflow [ ^ ]但我无法在单行shell命令中删除。
.
2. Followed article - bash - Linux: Remove path from $PATH variable - Stack Overflow[^] but I could not remove in the single line shell command.
推荐答案
PATH变量。在我的情况下 -
PATH variable. In my case -
PATH=
PATH:〜/ bin
PATH:~/bin
。当我试图执行文件时,它说
. And when I tried to execute the file it is saying
没有这样的文件或目录
No such file or directory
。
2.后续文章 - bash - Linux:从
.
2. Followed article - bash - Linux: Remove path from
删除路径
PATH变量 - 堆栈溢出 [ ^ ]但我无法在单行shell命令中删除。
PATH variable - Stack Overflow[^] but I could not remove in the single line shell command.
这篇关于无法从任何地方执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!