Last login: Wed 23 Sep 2026 on tty1
Archived edition.
Ten things the page says. Every one of them is on your machine right now — run the command above and check.
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.[man]
don't copy the file data, just the attributes.[man]
make a backup of each existing destination file.[man]
like --backup but does not accept an argument.[man]
copy contents of special files when recursive.[man]
if an existing destination file cannot be opened, remove it and try again (this option is ignored when the -n option is also used).[man]
prompt before overwrite (overrides a previous -n option).[man]
follow command-line symbolic links in SOURCE.[man]
do not overwrite an existing file and do not fail (overrides a -u or previous -i option). See also --update; equivalent to --update=none.[man]
same as --preserve=mode,ownership,timestamps.[man]
Copy a file and watch cp tell you it did
cp is silent by default and silently destroys the destination. -v and -n are the two flags that make it answerable.
These commands write files, so run them in a scratch directory:
$ mkdir -p ~/motd-lab && cd ~/motd-lab
$ echo 'first draft' > a.txt
$ cp -v a.txt b.txt
$ cp -vn a.txt b.txt
$ ls -l
WHAT YOU SHOULD SEEThe first cp prints 'a.txt' -> 'b.txt'. The second prints nothing and changes nothing, because -n refused to overwrite. Two files, same size.
Five questions, each one taking a term out of a line above. Ten points for each. Tap hear it to have a question read to you; answering plays the verdict.
QUESTION 1 OF 5
Which term completes this line from the page? “Copy SOURCE to DEST, or multiple SOURCE(s) to _____.”
From point 1 above.
QUESTION 2 OF 5
Which term completes this line from the page? “make a backup of each existing _____ file.”
From point 3 above.
QUESTION 3 OF 5
Which term completes this line from the page? “copy contents of special files when _____.”
From point 5 above.
QUESTION 4 OF 5
Which term completes this line from the page? “prompt before _____ (overrides a previous -n option).”
From point 7 above.
QUESTION 5 OF 5
Which term completes this line from the page? “do not overwrite an existing file and do not fail (overrides a -u or previous -i option). See also --update; _____ to --update=none.”
From point 9 above.
Answer all five to bank your points.
Five chapters, three voices. Tap one to jump — the player at the bottom of the screen follows.
Know someone with ten minutes and a terminal? Send them today's page. This is the card that appears when you post it:
The Operator has a dispatch on cp(1),
and he files them for subscribers only. It is free.
Join the club, or read about
the series.
MOTD is a weekday reading of one manual page already installed on your own
machine. Every statement is quoted from that page or from the GNU info
documentation beside it, and every edition names the command that shows you
the source.
archive ·
the operator ·
about ·
podcast ·
Feline Union