Linux下如何运行.sh文件
在Linux系统下运行.sh文件有两种方法,比如在~/桌面/LoveDA-master/Semantic_Segmentation/scripts目录下有个predict_test.sh文件第一种(这种办法需要用chmod使得文件具备执行条件(x): chmod u+x datelog.sh):1、在任何路径下,输入该文件的绝对路径:~/桌面/LoveDA-master/Semantic_Segm
在Linux系统下运行.sh文件有两种方法,
比如在~/桌面/LoveDA-master/Semantic_Segmentation/scripts目录下有个predict_test.sh文件
第一种(这种办法需要用chmod使得文件具备执行条件(x): chmod u+x datelog.sh):
1、在任何路径下,输入该文件的绝对路径:
~/桌面/LoveDA-master/Semantic_Segmentation/scripts/predict_test.sh
就可执行该文件(当然要在权限允许情况下)
2、cd到~/桌面/LoveDA-master/Semantic_Segmentation/scripts文件的目录下,然后执行:(相对路径)
./predict_test.sh
半永久权限:
永久权限:
第二种(这种办法不需要文件具备可执行的权限也可运行):
1、在该文件路径下sh加上文件名字即可,
sh ./predict_test.sh
2、在任意路径下,sh 加上文件路径及文件名称:
sh ~/桌面/LoveDA-master/Semantic_Segmentation/scripts/predict_test.sh
win10下如何运行.sh文件
- 安装git
- 搜索git或开始菜单运行git,或cmd中进入git所在目录的bin文件夹下
- .输入
sh .\predict_test.sh
更多推荐
所有评论(0)