mv [options] source dest mv [options] source… directory Options: [-bfiuv] [-S backup-suffix] [-V {numbered,existing,simple}] [--backup] [--force] [--interactive] [--update] [--verbose] [--suffix=backup-suffix] [--version-control={numbered,existing,simple}] [--help][--version]
The mv command moves a source filename to a target filename. The filename and the target may not have the same name. If target is not a directory, only one file may be specified before it; if it is a directory, more than one file may be specified. If target does not exist, mv creates a file named target. If target exists and is not a directory, its contents are overwritten. If target is a directory, the file(s) are moved to that directory.
1 mv file1 newname 2 mv -i test1 test2 train |
Explanation
Renames file1 to newname. If newname exists, its contents are overwritten.
Moves files test1 and test2 to the train directory. The -i switch is for interactive mode, meaning it asks first before moving the files.
3.144.113.55