Linux執(zhí)行.sh文件,提示No such file or directory的問題的解決方法
原因:在windows中寫好shell腳本測試正常,但是上傳到 Linux 上以腳本方式運(yùn)行命令時(shí)提示No such file or directory錯(cuò)誤,那么一般是文件格式是dos格式的緣故,改成unix 格式即可。


用vim打開該sh文件,輸入:
:set ff?
回車,顯示fileformat=dos,重新設(shè)置下文件格式:
:set ff=unix?
保存退出:?
:wq?
再執(zhí)行

參考文檔:https://blog.csdn.net/fireblue1990/article/details/74275843
https://blog.laoda.de/archives/aria2-rclone-filebrowser
標(biāo)簽: