bash: cd: too many arguments 报错解决方法

简介: bash: cd: too many arguments 报错解决方法

今天在服务器上跑程序的时候,cd进文件夹的时候出错了。


错误


bash: cd: too many arguments


06fe4971430f475c9c34f2d6ea9b7ba8.png


经过查找发现


原因:


路径名或者变量有空格时候,会造成参数太多的错误提示


解决方法:


把空格的地方用引号包括起来


16325e326ab946ca9047e043caaa1062.png

目录
相关文章
|
7小时前
|
Java Shell Linux
解决 centos下执行sh文件报错“/bin/bash^M: 坏的解释器:没有那个文件或目录” 问题
解决 centos下执行sh文件报错“/bin/bash^M: 坏的解释器:没有那个文件或目录” 问题
100 0
|
Linux Shell Python
-bash: pip: command not found pip命令报错 解决方法(Centos版)
-bash: pip: command not found pip命令报错 解决方法(Centos版)
3530 0
|
12月前
|
Shell Linux
Linux pip命令报错 -bash: pip: command not found
Linux pip命令报错 -bash: pip: command not found
259 0
|
分布式计算 Hadoop Shell
docker报错: bash: which: command not found
docker报错: bash: which: command not found
87 0
|
Shell Python
yum报错:bash: /usr/bin/yum: /usr/bin/python: 坏的解释器:没有那个文件或目录
yum报错:bash: /usr/bin/yum: /usr/bin/python: 坏的解释器:没有那个文件或目录
1741 0
yum报错:bash: /usr/bin/yum: /usr/bin/python: 坏的解释器:没有那个文件或目录
|
Shell Linux Windows
解决报错 “build.sh /bin/bash^M: 坏的解释器:没有那个文件或目录”
解决报错 “build.sh /bin/bash^M: 坏的解释器:没有那个文件或目录”
764 0
|
Linux 应用服务中间件 Shell
linux下编译make文件报错“/bin/bash^M: 坏的解释器,使用grep快速定位代码位置
一、linux下编译make文件报错“/bin/bash^M: 坏的解释器 参考文章:http://blog.csdn.net/liuqiyao_01/article/details/41542101#comments 自己测试的结果: 【1】使用windows 下的编辑工具 新建文件doc2unix.
1253 0
|
6小时前
|
监控 安全 Shell
防止员工泄密的措施:在Linux环境下使用Bash脚本实现日志监控
在Linux环境下,为防止员工泄密,本文提出使用Bash脚本进行日志监控。脚本会定期检查系统日志文件,搜索敏感关键词(如"password"、"confidential"、"secret"),并将匹配项记录到临时日志文件。当检测到可疑活动时,脚本通过curl自动将数据POST到公司内部网站进行分析处理,增强信息安全防护。
115 0
|
7小时前
|
Linux Shell Windows
4:Bash shell命令-步入Linux的现代方法
4:Bash shell命令-步入Linux的现代方法
55 0