'mv cannot stat '*.txt' : No such file or directory [closed]
Be nice. I'm learning Linux and can't find this answer (I've searched) I'm trying to move all the .txt files in Folder1 to my Documents directory.
~$ 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
From here I tried moving foldernew by name to ~/Documents and it worked. Can someone explain what I am doing incorrectly?
Thanks so much!!
Solution 1:[1]
It looks like you have a bunch of files that end in .txt, (note the comma), so *.txt doesn't find them.
Rename the files to remove the comma and try again.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | that other guy |
