Linux执行.sh文件,提示No such file or directory的问题的解决方法
亲测有效:http://www.jb51.net/LINUXjishu/56395.html
Linux执行.sh文件,提示No such file or directory的问题的解决方法
在window平台下,写好shell脚本文件,迁移到linux平台,赋过可执行权限,执行该sh文件,
却提示No such file or directory。ls 了下,确实有该文件,怎么会事呢,
难道是文件格式兼容性问题?用vim打开该sh文件,输入:
:set ff
回车,显示fileformat=dos,重新设置下文件格式:
:set ff=unix
保存退出:
[plain]
:wq
再执行,竟然可以了。这个事情又给我提了次醒,程序尽量在linux下编写,迁移时,也许会少很多问题。
Linux执行.sh文件,提示No such file or directory的问题的解决方法的更多相关文章
- linux sh文件提示 no such file or directory
Linux执行.sh文件,提示No such file or directory的问题的解决方法 12-06-28 16:59作者:love__coder Linux执行.sh文件,提示No such ...
- linux 下执行.sh文件提示permission denied
linux 下执行.sh文件提示permission denied 在脚本文件目录下运行命令,赋予权限: chmod 777 *.sh or chmod +x *.sh
- Linux运行shell脚本提示No such file or directory错误的解决办法
Linux执行.sh文件,提示No such file or directory的问题: 原因:在windows中写好shell脚本测试正常,但是上传到 Linux 上以脚本方式运行命令时提示No s ...
- Linux执行.sh文件,提示No such file or directory的问题
问题描述 在window平台下,写好shell脚本文件,迁移到linux平台,赋过可执行权限,执行该sh文件,却提示NO such file or directory 解决方案 难道是文件格式兼容性问 ...
- Linux执行.sh文件Permission denied
执行sh文件报没有权限: 看下该文件的权限: 缺少执行的权限,直接加上吧: test.sh 权限加上去了,可以执行sh文件了 若用 chmod 4755 filename 可使此程序具有root的权限
- linux运行sh文件提示 permission denied
原因:文件没权限 解决:chmod +x 文件名 赋予执行权限或者 chmod 777 文件(赋予最高权限)
- 解决play-1.4.0在linux或mac下提示No such file or directory的问题
问题原因:"play"脚本中有特殊符号. 解决方案:写脚本去掉即可. 代码:fixplay.py 放在play-1.4.0目录下执行.亲测在osx与ubuntu下均可用. with ...
- Linux 'XXXXXX' "is not in the sudoers file. This incident will be reported" 解决方法
添加方法如下: 1.进入root模式su - 注意:su和-之间有空格输入当前用户的密码 2.添加写权限chmod u+w /etc/sudoers 3.将自己加入到sudoers中 gedit / ...
- arm-none-linux-gnueabi-gcc No such file or directory这个错误的解决方法
这个gcc可执行文件是32位的版本,而在64位系统上需要安装32位兼容包才可以运行正常 .用file命令查看这个文件得到: 解决办法: 安装ia32-libs sudo apt-get install ...
随机推荐
- c# 抽象类和抽象方法
参考:http://www.runoob.com/csharp/csharp-polymorphism.html https://zhidao.baidu.com/question/587686949 ...
- es5数组的新方法
1.every方法 //逻辑判断返回值为一个Boolean值 every方法就是每一个返回函数的返回值都是true的时候,才为true,否则为false var arr=[1,2,5,88,5,555 ...
- UVaLive 3641 Leonardo's Notebook (置换)
题意:给定一个置换 B 问是否则存在一个置换 A ,使用 A^2 = B. 析:可以自己画一画,假设 A = (a1, a2, a3)(b1, b2, b3, b4),那么 A^2 = (a1, a2 ...
- DDR中的命令
(3) 列地址选择(CAS#): 选择器件内感兴趣的地址列 行地址选择(RAS#): 选择设备中感兴趣的地址行. (4)(precharge)预充电 DRAM读取具有破坏性,也就是说,在读操作中会破坏 ...
- 5.Vue临时上传文件夹
1.在项目目录中,通过npm install multiparty进行安装必要组件npm install multiparty --save-dev 2.app.js中添加app.use(bodyPa ...
- day24(JAVAWEB上传与下载)
javaWeb上传与下载 上传: 上传方式: jspSmartUpload :应用在jsp上的文件上传与下载组件. FileUpload :用用在jaava环境上的上传的功能 ...
- _编程语言_C_C++_数据结构_struct
Struct 语句,访问成员使用 点结构. Example: #include <iostream> #include <cstring> using namespace st ...
- SRM467
250pt: 一个学生等老师来上课的,但是他不知道老师啥时候会来的,然后他等waiting时间后觉得无聊就会出去转walking时间,回来等待waiting时间后老师没来就会再次出去.老师会在a... ...
- maven 添加jdbc6
1 把jdbc6 拷贝到C:\Users\{用户}\ 2 mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dver ...
- E - Evaluate Matrix Sum
Description Given a matrix, the elements of which are all integer number from 0 to 50, you are requi ...