# cp¶

By default, the cp command copies a file into another file or a directory.

cp source target


The first argument is the file to be copied.

The second argument is the file to be created or the directory where to copy the file (in that case, the name of the new file will be identical to the source file name).

touch a
mkdir b
ls
ls b
cp a c
ls
cp a b
ls
cp a b/c
ls b