Command line · Question 9 of 12

How do you copy a directory including its content?

1 answer is correct. Medium

Show answer

Answer

  • A cp -r source target

Explanation

cp copies files; only with -r (recursive) does it copy directories with their content. mv moves or renames.

Certifications & exams

Which exam comes next?

You can already practise for 19 exams, and 21 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications