What happens when you try to move something to a directory that doesn't exist?

I was working on the Artusi project: https://www.codecademy.com/courses/learn-the-command-line/projects/artusi

For exercise 20, I was supposed to move airdry.txt into the ceramic directory. I accidentally typed “mv airdry.txt cermaic” which moved airdry.txt and created cermaic, but cermaic isn’t a directory. So, what is cermaic and what happened to airdry.txt? Thanks!

mkdir TestDir
cd TestDir
touch test.txt
echo "Hello World" >> test.txt
cat test.txt
output: Hello World
mv test.txt anotherTest
ls
output: anotherTest
cat anotherTest
output : Hello World

I hope this shows you what happened!

you renamed the file. In *nix files don’t need extensions.

1 Like