des*_*ert 14 command-line bash scripts files directory
我有文件和目录的用奇怪的名字的集合,它们包含空格和特殊字符\,*,),(和?。当我尝试在命令行或脚本中使用它们时,所有这些都会导致问题,例如:
$ cd space dir
bash: cd: space: No such file or directory
$ cat space file
cat: space: No such file or directory
cat: file: No such file or directory
$ cat (
bash: syntax error near unexpected token `newline'
$ echo content >\
> ^C
$ ls ?
( ) * ? \
Run Code Online (Sandbox Code Playgroud)
如何在终端中输入包含特殊字符的文件或目录名称?
| 归档时间: |
|
| 查看次数: |
2779 次 |
| 最近记录: |