When you copy or move files, bash looks for a source file to copy and a destination to which to copy the file. Moving files to a filename that does not exist is the same as renaming a file. For example, if you move a file to a filename that does not exist, bash renames the source file with the destination filename.
Copying or moving a source file to an existing filename overwrites the existing destination file with the source file. Copying and moving a source file to a destination directory copies or moves the file to the directory without overwriting it. You can copy or move multiple files to a directory. If the source file or destination location is not in your working directory, use the absolute path name of the file or destination directory.
You can use command options when you move or copy files to backup files that would normally be overwritten (-b), or prompt the user before overwriting or removing destination files (-i). For a full list of command options available with the Copy and Move commands, see the Manual page for each command.
To copy a file
1. At the command line, type,
cp [options] <sourcefile> <destination>
2. Press ENTER.
To copy multiple files
1. At the command line, type,
cp [options] <sourcefile>... <directory>
2. Press ENTER.
To move a file
1. At the command line, type,
mv [options] <sourcefile> <destination>
2. Press ENTER.
To move multiple files
1. At the command line, type,
mv [options] <sourcefile>... <directory>
2. Press ENTER.
Notes
Do not include the brackets in the command line text. For information about notation conventions for commands, see "Using notation conventions for Linux commands."
The ellipsis indicates that you can copy or move multiple files simultaneously; for example, cp [options] <file1> <file2> <file3>.
Remember to include a hyphen (-) before command options.