r/linux • • Aug 27 '15

Learn the Command Line from codeacademy

https://www.codecademy.com/en/courses/learn-the-command-line?utm_campaign=lcl_release&utm_source=reddit
305 Upvotes

59 comments sorted by

View all comments

16

u/EVOIXMR Aug 27 '15

mv batman.txt spiderman.txt

To rename a file, use mv with the old file as the first argument and the new file as the second argument. By moving batman.txt into spiderman.txt, we rename the file as superman.txt.

Is this a mistake? I'm not quite sure what superman.txt has anything to do with "mv batman.txt spiderman.txt"

Being new to Unix this confused me quite a bit.

20

u/bushysmalls Aug 27 '15

Seems like a typo to me.

6

u/EVOIXMR Aug 27 '15

Thanks, I googled for a half hour trying to figure out why moving one file to another renamed it a completely separate file then I just figured it must be a mistake once nothing turned up. I just wanted to make sure.