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"
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.
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.