问题描述

在window平台下,写好shell脚本文件,迁移到linux平台,赋过可执行权限,执行该sh文件,却提示NO such file or directory

解决方案

难道是文件格式兼容性问题?用vim打开该sh文件,输入:
:set ff  
回车,显示fileformat=dos,重新设置下文件格式:
:set ff=unix  
保存退出:
:wq 
 

Linux执行.sh文件,提示No such file or directory的问题的更多相关文章

  1. 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 ...

  2. Linux执行.sh文件,提示No such file or directory的问题的解决方法

    亲测有效:http://www.jb51.net/LINUXjishu/56395.html Linux执行.sh文件,提示No such file or directory的问题的解决方法 在win ...

  3. linux 下执行.sh文件提示permission denied

    linux 下执行.sh文件提示permission denied 在脚本文件目录下运行命令,赋予权限: chmod 777 *.sh or chmod +x  *.sh

  4. Linux运行shell脚本提示No such file or directory错误的解决办法

    Linux执行.sh文件,提示No such file or directory的问题: 原因:在windows中写好shell脚本测试正常,但是上传到 Linux 上以脚本方式运行命令时提示No s ...

  5. Linux执行.sh文件Permission denied

    执行sh文件报没有权限: 看下该文件的权限: 缺少执行的权限,直接加上吧: test.sh 权限加上去了,可以执行sh文件了 若用 chmod 4755 filename 可使此程序具有root的权限

  6. linux运行sh文件提示 permission denied

    原因:文件没权限 解决:chmod +x 文件名 赋予执行权限或者  chmod 777 文件(赋予最高权限)

  7. 解决play-1.4.0在linux或mac下提示No such file or directory的问题

    问题原因:"play"脚本中有特殊符号. 解决方案:写脚本去掉即可. 代码:fixplay.py 放在play-1.4.0目录下执行.亲测在osx与ubuntu下均可用. with ...

  8. linux执行python的脚本文件,提示提示No such file or directory

    在window平台下,写好python脚本文件,迁移到linux平台,赋过可执行权限,执行该sh文件,却提示No such file or directory.ls 了下,确实有该文件,怎么会事呢, ...

  9. linux 下执行.sh文件总是提示permission denied

      linux 下执行.sh文件总是提示permission denied 如果你是root登陆的话(不是的话,切换到root用户,对*.sh赋可执行的权限) chmod 777 *.sh or ch ...

随机推荐

  1. gojs插件使用教程

    目录 一.简介 二.简单使用 三.重要概念 1.TextBlock创建文本 2.Shape图形 3.Node节点(文本与图形结合) 4.Link箭头 四.数据绑定(前后端交互数据渲染) 五.去除水印 ...

  2. apiAutoTest:支持自定义函数,用例中可调用

    0. 前言 apiAutoTest从去年8月以来开源至今,也更新了不少内容,一起来看看吧 第一个版本 - 2020/08/08 增加实际响应存储数据的方法,并在字典可以处理依赖见tools/svae_ ...

  3. JAVA基础(三)—— 输入输出处理

    JAVA基础(三)-- 输入输出处理 1 输入解析 //Scanner获取输入 import java.util.Scanner; Scanner s = new Scanner(System.in) ...

  4. Django练习遇到的错误记录

    _reverse_with_prefix() argument after ** must be a mapping, not set 错误代码: def get_absolute_url(self) ...

  5. Service Cloud 零基础(五)Trailhead学习 Embedded Chat

    本篇参考:https://trailhead.salesforce.com/content/learn/modules/web-chat 想一下我们为什么要用service cloud呢?为什么要有s ...

  6. Git:分支管理

    代码中至少有一个分支,就是主分支master,默认都是在主分支上开发. 多分支 分支名: 版本库中必须唯一 不能以 - 开头 可以试用/,但不能以/结尾,被/分隔的名称不能以.开头 不能有连个连续的 ...

  7. weblogic弱口令+后台getshell

     https://www.cnblogs.com/bmjoker/p/9822886.html利用docker环境模拟了一个真实的weblogic环境,其后台存在一个弱口令,并且前台存在任意文件读取漏 ...

  8. Celery:小试牛刀

    Celery是如何工作的? Celery 由于 其分布式体系结构,在某种程度上可能难以理解.下图是典型Django-Celery设置的高级示意图(FROM O'REILLY): 当请求到达时,您可以在 ...

  9. Excel老式技术

    Excel老式技术 VBS宏脚本嵌入明文代码

  10. POJ_1458 Common Subsequence 【LCS】

    一.题目 Common Subsequence 二.分析 比较基础的求最长升序子序列. $DP[i][j]$表示的是字符串$S1[1...i]$与$S2[1...j]$的最长公共子序列长度. 状态转移 ...