WeCodeAcademy

Copying with cp

cp source destination makes a copy. The original stays where it is.

Examplebash
Open in editor »
/ $

To copy a whole folder and everything inside it, add -r (recursive).

Examplebash
Open in editor »
/ $
Quick check

Which command copies the folder `site` to `site-backup`?

Your turn: write the code

Put hi in a.txt, copy it to b.txt, then print b.txt.

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.