mv is a Unix command that moves one or more files or directories from one place to another. If both filenames are on the same filesystem, this results in a simple file rename; otherwise the file content is copied to the new location and the old file is removed. Using mv requires the user to have write permission for the directories the file will move between. This is because mv changes the content of both directories (i.e., the source and the target) involved in the move. When using the mv command on files located on the same filesystem, the file's timestamp is not updated. On UNIX implementations derived from AT&T UNIX, cp, ln and mv are implemented as a single program with hard-linked binaries. The behavior is selected from the path name argv[0]. This is a common technique by which closely related commands that have been packaged as a unit allow the user to specify the particular course of the intended action. History A command that moves a directory entry to a new directory was first implemented within Multics. It can be contracted to . Later, the command appeared in Version 1 Unix and became part of the X/Open Portability Guide issue 2 of 1987. The version of mv bundled in GNU coreutils was written by Mike Parker, David MacKenzie, and Jim Meyering. The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities. The command has also been ported to the IBM i operating system. Conflicting existing file When a filename is moved to an existing filename, the existing file is deleted (clobbered) by default. If the existing file is not writable but is in a directory that is writable, the mv command asks for confirmation (if run from a terminal) before proceeding, unless the -f (force) option is used. Accidental overwriting can be prevented using the GNU -n (long format: --no-clobber) flag. Alternatively, -u (--update) only overwrites destination files that are older than source files, -i (--interactive) asks for confirmation upon each name conflict, and -b (--backup) renames target files out of the way. A related ambiguity arises when a filename is moved to an existing directory. By default, mv would handle this as one trying to move a name inside this directory. GNU mv has a switch for disabling this assumption and