mv cannot stat '*.txt': 没有那个文件或目录

mv cannot stat '*.txt' : No such file or directory

乖一点。我正在学习 Linux,但找不到这个答案(我已经搜索过了) 我正在尝试将 Folder1 中的所有 .txt 文件移动到我的文档目录。

~$ ls
Desktop Documents Downloads file1.txt Music Public Templates test user0files.txt user-files.txt Videos
~$ cd ~/Documents
~/Documents$ ls 
Folder1 Folder2 test1.txt test2.txt
~/Documents$ cd ~/Documents/Folder1
~/Documents/Folder1$ ls
bale.txt, ball.txt, bowl.txt, foldernew
~/Documents/Folder1$ mv *.txt ~/Documents
mv: cannot stat '*.txt': No such file or directory

从这里开始,我尝试按名称将 foldernew 移动到 ~/Documents 并且成功了。谁能解释一下我做错了什么?

非常感谢!!

您似乎有一堆以 .txt, 结尾的文件(注意逗号),因此 *.txt 找不到它们。

重命名文件以删除逗号,然后重试。