And in our current folder, there’s also a file named
hello_terminal. I want you to rename this file now into
hello_world.py. All right. For this, I will use the move command.
mv stands for move, and then I start off by giving it the file I want to rename, or folder, and then as a second command—so I’ll separate it with a space—I can put what I want to name it. And you said
so it still contains
"Hello, Terminal!". Okay, so that now was was very interesting because I would’ve expected something like, I don’t know,
rn or something for rename, but the mindset here is basically you are moving one file to some target location. So, you could, for example, move this file into the subdirectory as well. Before, we copied the file, but we could also move the file there.
And with this command, you can also rename the file in the same go, basically. And since you’re not putting it into a subdirectory, but into the same directory, you’re basically, like, moving the file into the same directory and renaming it to
hello_world. Yep. Okay, cool.
Become a Member to join the conversation.