mv neatguy tidyguymoves the contents of neatguy to the contents of tidyguy. This command reminds me of the time Chicago Bulls forward Stacey King said:
I'll always remember this as the night that Michael Jordan and I combined to score 70 points.King said that after scoring one point in a game in which Jordan scored sixty-nine.
All that really happened was that the file's name was changed. The reason it is called the move instead of rename or something like that is that you can include pathnames (just like you have done before in cp and rm). Including pathnames allows you to move a file into a different directory, hence the name. The mv command works on both filenames and directory names exactly the same way.
The -i flag works here just like it worked with cp. Setting this flag will prompt you before it moves a file on top of one that already exists.
WARNING: for (i = 0 ; i <= 50 ; i++) printf("Don't "); don't use wildcards with the mv command unless the destination is a directory. The mv command doesn't know what to do if you tell it to move a bunch of files into a single filename and so it will move all the files you selected on top of each other.
© 1993-1998 Christopher C. Taylor