thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

IT Support & Hardware · Foundational

cp Command

A Linux/macOS command that copies files and directories.

Definition

cp file dest copies a file, and cp -r copies directories recursively. cp -p preserves timestamps and permissions. It corresponds to Windows copy/xcopy.

Example

cp -r /home/jdoe/projects /backup/

Exam tip

Use -r for directories.

Related terms