In Linux land, moving and renaming a file are the same thing. It doesn’t matter whether you are moving the directory to another or from one filename to another filename in the same directory, there is only one command to remember. To move a file named
~/archive, use this command:
matthew@seymour:~$ mv documents/filename archive
Notice that the filename is not included in the destination. The destination here must be an existing directory. If it is not, the file is renamed to the term used. Some examples will make this clear.
To rename a file that is in my current directory, I could use the following: