cp src dest

Copy a file to a new location

cp copies a file. The destination can be a filename (rename while copying) or a directory (copy into it). cp overwrites the destination without warning by default.

Example

$ cp nginx.conf nginx.conf.bak
$ ls
nginx.conf  nginx.conf.bak
Tip: Type it yourself in the terminal below - reading is not the same as doing.