在Linux中提示No such file or directory解决方法
来源:互联网 发布:常见设计模式 java 编辑:程序博客网 时间:2024/05/18 06:44
编写shell脚本执行一些命令发现很多的地方出现了问题,总是No such file or directory。但是事实上是有的,在网上查找了一些观点,总结一下:
(1)在Windows下转换:
利用一些编辑器如Notepat++,UltraEdit或EditPlus等工具先将脚本编码转换,再放到Linux中执行。转换方式如下(UltraEdit):File-->Conversions-->DOS->UNIX即可。
(2) 用vim打开该sh文件,输入:
命令
:set ff
回车,显示fileformat=dos,重新设置下文件格式:
命令
:set ff=unix
保存退出: 命令
:wq
再执行,就可以了
(3)在linux中的权限转换
也可在Linux中转换:
首先要确保文件有可执行权限
#chmod u+x filename
然后修改文件格式
0 0
- 在Linux中提示No such file or directory解决方法
- Linux中提示No such file or directory解决方法
- Linux中提示No such file or directory解决方法
- Linux执行.sh文件,提示No such file or directory的问题的解决方法
- Linux执行.sh文件,提示No such file or directory的问题的解决方法
- Linux执行可执行文件提示No such file or directory的解决方法
- 64位linux提示gnu/stubs-32.h:No such file or directory的解决方法
- Linux下执行可执行文件提示:No such file or directory的解决方法
- Linux执行可执行文件提示No such file or directory的解决方法
- Linux执行.sh文件,提示No such file or directory的问题的解决方法
- Linux执行可执行文件提示No such file or directory的解决方法
- Linux,执行.sh文件,提示No such file or directory
- Linux,执行.sh文件,提示No such file or directory
- Linux执行脚本却提示No such file or directory
- Linux下执行脚本提示No such file or directory
- Linux adb运行时提示:No such file or directory
- Linux下执行脚本提示No such file or directory
- Linux执行可执行文件提示No such file or directory
- [转载]代码虚拟化
- Python模块学习系列(2)----struct
- 去除源文件中的重复行的程序流程及其C代码实现
- 提高mysql千万级大数据SQL查询优化30条经验(Mysql索引优化注意)
- 11g RAC基于服务端的TAF,遇到会话failover到其他节点,但是VIP未漂
- 在Linux中提示No such file or directory解决方法
- OC分析——objc-api.h文件
- TinyOS论文07:MILU :
- Mac osx 10.10.5上安装NGINX
- Leetcode191: Bulls and Cows
- java实现图片裁剪
- common.js
- android:layout_gravity和android:gravity详解
- Spring源码阅读4.1-Aspecjt AOP之获取Adivsor