mv fromfile tofile mv fromfile... todir
If there are two arguments of the same type (i.e., both directories or both not) then mv will rename the fromfile to tofile.
For files, a previously file named tofile will be (silently) removed. This requires write permission for the current directory. Write permission is not needed for tofile.
For directories, a previously named directory tofile will be (silently) removed if empty; otherwise, the action will fail.
If the last argument is a directory, the earlier arguments (all files) will be moved into that directory. Any previously existing files of the same name will be overwritten.
Directories cannot be moved into other directories.
changing file attributes (e.g., name) |
removing files and directories|