bash : cd : 参数太多
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47351933/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
bash : cd : too many arguments
提问by Veerabala J
I'm new to Ubuntu. I tried to open a file with name which has space in it. I used cd command. it shows bash : cd : too many arguments
我是 Ubuntu 的新手。我试图打开一个名称中有空格的文件。我使用了 cd 命令。它显示bash : cd : 参数太多
Whenever a file name has a space in it. It is showing this error. What should I do?
每当文件名中有空格时。它显示此错误。我该怎么办?
回答by Sora.
Use quotes:
使用引号:
cd "new folder"
or escape the space:
或逃离空间:
cd new\ folder
(That being said, cd
does not open a file but changes the working directory.)
(也就是说,cd
不会打开文件,而是更改工作目录。)