Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left

  Apply Now

Linux Basics

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...