当前位置: 首页 > news >正文

Linux 命令行访问名字中包含空格的文件或文件夹

Linux 命令行访问名字中包含空格的文件或文件夹

  • References

在 Windows 下命名文件或文件夹名有空格是可以的,甚至在 Windows 和 Ubuntu 虚拟机共享的文件中也可以这么做,但是在 Ubuntu 中空格要用下划线代替,养成好习惯。Linux 会把空格当成分割符处理,无法找到文件或文件夹。

文件夹 tensorflow boy 包含空格,访问方式为 cd tensorflow\ boy、cd “tensorflow boy”、cd ‘tensorflow boy’。

strong@foreverstrong:~$ cd ForeverStrong/
strong@foreverstrong:~/ForeverStrong$ ll
total 20
drwxrwxr-x  5 strong strong 4096 Dec 22 10:28 ./
drwxr-xr-x 52 strong strong 4096 Dec 21 10:22 ../
drwxrwxr-x  2 strong strong 4096 Dec 22 10:18 tensorflow boy/
strong@foreverstrong:~/ForeverStrong$ 
strong@foreverstrong:~/ForeverStrong$ cd tensorflow\ boy/
strong@foreverstrong:~/ForeverStrong/tensorflow boy$ ll
total 8
drwxrwxr-x 2 strong strong 4096 Dec 22 10:18 ./
drwxrwxr-x 5 strong strong 4096 Dec 22 10:28 ../
strong@foreverstrong:~/ForeverStrong/tensorflow boy$ 
strong@foreverstrong:~/ForeverStrong/tensorflow boy$ cd ..
strong@foreverstrong:~/ForeverStrong$ 
strong@foreverstrong:~/ForeverStrong$ cd "tensorflow boy"
strong@foreverstrong:~/ForeverStrong/tensorflow boy$ ll
total 8
drwxrwxr-x 2 strong strong 4096 Dec 22 10:18 ./
drwxrwxr-x 5 strong strong 4096 Dec 22 10:28 ../
strong@foreverstrong:~/ForeverStrong/tensorflow boy$ 
strong@foreverstrong:~/ForeverStrong/tensorflow boy$ cd -
/home/strong/ForeverStrong
strong@foreverstrong:~/ForeverStrong$ 
strong@foreverstrong:~/ForeverStrong$ cd 'tensorflow boy'
strong@foreverstrong:~/ForeverStrong/tensorflow boy$ ll
total 8
drwxrwxr-x 2 strong strong 4096 Dec 22 10:18 ./
drwxrwxr-x 5 strong strong 4096 Dec 22 10:28 ../
strong@foreverstrong:~/ForeverStrong/tensorflow boy$

References

[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/

http://www.lryc.cn/news/287740.html

相关文章:

  • Dart/Flutter工具模块:the_utils
  • 矩阵号:日入100+,八大提示词(Prompt)使用技巧
  • 爬虫工作量由小到大的思维转变---<第三十九章 Scrapy-redis 常用的那个RetryMiddleware>
  • 【MongoDB】mongodb安装及启动踩坑点
  • 动态规划——采矿的小奇【集训笔记】
  • wpf控件Expander集合下的像素滚动
  • docker 基础手册
  • 记一次SPI机制导致的BUG定位【不支持:http://javax.xml.XMLConstants/property/accessExternalDTD】
  • Kali如何启动SSH服务并实现无公网ip环境远程连接
  • 谷粒商城配置虚拟机
  • Java中文乱码浅析及解决方案
  • 【前端基础--3】
  • Obsidian笔记软件结合cpolar实现安卓移动端远程本地群晖WebDAV数据同步
  • 51单片机电子密码锁Proteus仿真+程序+视频+报告
  • [BSidesCF 2020]Had a bad day
  • [笔记]事务简介-springboot
  • 初识计算机网络 | 计算机网络的发展 | 协议初识
  • 【sgTree】自定义组件:加载el-tree树节点整棵树数据,实现增删改操作。
  • vue2面试题:vue组件之间的通信方式有哪些?
  • Pytorch神经网络模型nn.Sequential与nn.Linear
  • C++-gdb调试常用功能
  • 快速上手的AI工具-文心一言辅助学习
  • Boost 适用 filesystem 库,statx 函数无法找到引用问题的解决方案。
  • MyBatis中一级缓存是什么?SqlSession一级缓存失效的原因?如何理解一级缓存?
  • 项目解决方案:多地医馆的高清视频监控接入汇聚联网
  • 【前端基础--2】
  • 【GitHub项目推荐--提取文字】【转载】
  • WebSocket与Shiro认证信息传递的实现与安全性探讨
  • QT 实现自动生成小学两位数加减法算式
  • 小程序学习-20