Linux Basics

You are currently auditing this course.
25 / 107

Use cases of cp command

The operation performed by cp source destination depends on what source and destination are.

Its use cases are:

  1. When source and destination arguments are both files, the first file gets copied to the second one. If the second file is not present, then it is created first.

  2. When source and destination arguments are both directories, the source directory gets copied into the destination directory.

  3. When the source argument has single or multiple files or directories, they are moved to the destination directory. Remember, in this case, the destination must be a directory.


No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...