The ability to quickly and efficiently copy files and directories is important when using Linux. The following sections show you how to copy single or multiple files and directories.
The cp (copy) command is used to copy files. Use the original filename followed by a new filename on the command line to copy a single file:
$ cp notes notes.old
Use wildcards to copy multiple files to a new location:
$ cp *jpg vacation_pics/
Use the cp command with caution. Unless you use the -i (interactive) command-line option, the cp command overwrites existing files without prompting you first. When you use the -i option, the cp command prompts for a y or n:
$ cp -i notes.old notes cp: overwrite ...