Moving files is an essential task individuals often need to perform.
The mv
command and its usage
The mv
command is used to rename or move files and directories from one location to another.
Basic syntax:
|
|
The SOURCE
can be one or many files / directories, and the DEST
can be a single file or directory.
Moving multiple files to a directory
|
|
Moving matching files to a directory
|
|
Moving a directory to another directory
|
|
Moving files without clobbering
Using the -i
or --interactive
option, mv
will iteratively request user input for files with naming conflicts.
|
|
Renaming files
Rename file1
to file2
:
|
|