cp terminal command not copying and printing out usage: cp[-R [-H…

Last modified date

Comments: 0

Contents

Problem

When running the cp (copy) command in a Mac OS Terminal the file doesn’t get copied and instead is prints out the following message:

usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory

Solution

The message printed out above isn’t descriptive as to what the problem is.

The reason for this error message is because one of the directories that you are copying to or from doesn’t exist.

Check that the directories you are trying to copy to or from exist and then try running the command again.

JakTech

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.