To move a file, the
mv command can be used. Supply the source file and destination file as parameters to
mv in that order. Optionally, a directory can be supplied for the source and the destination or just the destination.
Renaming a file is actually nothing more than moving a file from one name to another. The following command is used to move a file:
packt@PacktPublishing:~$ mv /tmp/testfile /tmp/testdir/moved_testfile