linux - 如何在 Linux 终端中转到文件名之间有空格的目录?

标签 linux terminal

我试图在 Linux 终端中转到文件名之间有空格的目录。我试过这样做:

cd Magical Island
bash: cd: Magical: No such file or directory

如你所见,它没有起作用

我怎样才能让它发挥作用?

最佳答案

需要引用目录名:

cd 'Magical Island'

或转义空格字符:

cd Magic\ Island

关于linux - 如何在 Linux 终端中转到文件名之间有空格的目录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23019471/

相关文章:

batch-file - Windows : script/program for USB key that opens a console, 并设置路径和工作目录

json - 如何使用jq提取数据

ubuntu - 将某个文件从 CPIO 文件复制到不同的目录

python - 如何通过包含特定 python 版本的 docker 从 linux 运行 python 代码

linux - ~/.wine 的 Wine 的 "skeleton"在哪里?

php - Security::hash() 不返回相同的哈希值

python - 发送通知、Python 循环/计时器和 cron 作业哪个更好?

linux - 如何从客户端保持 telnet 连接处于事件状态

linux - 清除 Linux 终端模拟器中的最后两行(以及更多)打印行

linux - ld: 找不到 -lX11 或 -lpng