Linux存在指定文件,却提示No such file or directory解决方法

解决办法: 

用vim打开该sh文件,输入:

-- 在vim的底行模式下输入下面的命令并回车,显示fileformat=dos
:set ff  
-- 重新设置下文件格式
:set ff=unix  
-- 保存退出
:wq

再执行,就不会再提示No such file or directory这个问题了。

猜你喜欢

转载自blog.csdn.net/Penrosee/article/details/107667012