在 zhs 终端中移动文件初学者问题

在 zhs 终端中移动文件初学者问题

我试图将名为“peakpx (1).jpg”的文件从下载移动到我创建的新目录 thenew,但它不允许我移动它,mv ~/Downloads "peakpx (1).jpg" ~/Downloads/thenew但它不起作用,提示 loads/: 参数无效,我尝试不加引号,但仍然不起作用。然后不知何故,我在写入 peakpx 后按下 tab 键,它以某种方式将其转换为mv ~/Downloads/peakpx\ \(1\).jpg ~/Downloads/thenew,现在它确实将其移动到 thenew 目录,但不仅仅是那个文件,它还带走了其他名称类似的文件。通过按下lsthenew现在包含peakpx (1).jpg peakpx (2).jpg peakpx.jpg而不仅仅是 peakpx(1).jpg。我想知道那里发生了什么,以及我应该如何移动文件。我将在这里留下我的尝试和完整代码任何帮助都将不胜感激,因为我刚刚开始学习终端。

sofiavanessa@MacBook-Air Downloads % mv ~/Downloads/ "peakpx (2).jpg" ~/Downloads/thenew

mv: rename /Users/sofiavanessa/Downloads/ to /Users/sofiavanessa/Downloads/thenew/Downloads/: Invalid argument
mv: peakpx (2).jpg: No such file or directory
sofiavanessa@MacBook-Air Downloads % mv ~/Downloads/ " peakpx (2).jpg " ~/Downloads/thenew

mv: rename /Users/sofiavanessa/Downloads/ to /Users/sofiavanessa/Downloads/thenew/Downloads/: Invalid argument
mv: rename  peakpx (2).jpg  to /Users/sofiavanessa/Downloads/thenew/ peakpx (2).jpg : No such file or directory
sofiavanessa@MacBook-Air Downloads % mv ~/Downloads/ peakpx (2).jpg(.) ~/Downloads/thenew

zsh: no matches found: (2).jpg(.)
sofiavanessa@MacBook-Air Downloads % mv ~/Downloads/peakpx\ \(1\).jpg ~/Downloads/thenew 
sofiavanessa@MacBook-Air Downloads % cd thenew
sofiavanessa@MacBook-Air thenew % ls
peakpx (1).jpg  peakpx (2).jpg  peakpx.jpg
sofiavanessa@MacBook-Air thenew % mv ~/Downloads/thenew "peakpx (1).jpg" ~/Downloads
mv: /Users/sofiavanessa/Downloads/thenew and /Users/sofiavanessa/Downloads/thenew are identical
sofiavanessa@MacBook-Air thenew % ls
peakpx (2).jpg  peakpx.jpg
sofiavanessa@MacBook-Air thenew % cd ..
sofiavanessa@MacBook-Air Downloads % ls
0dcefed4-f293-446c-b514-76bb8c00ab11.jpeg
Critical Thinking Response # 1 .docx
Documento sin título.docx
Feldman Analysis Guidelines .docx
Feldman's Guide.pptx
Install Respondus LockDown Browser (x64c) 168715491.pkg
MAFRAQ CULCHERAL CRENTER BY MOAED SHAWAQFEH.png
googlechrome.dmg
peakpx (1).jpg
peakpx (3).jpg
thenew
sofiavanessa@MacBook-Air Downloads %```

相关内容