FAQ: Manipulation - cp Part I

This community-built FAQ covers the “cp Part I” exercise from the lesson “Manipulation”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

Learn the Command Line

FAQs on the exercise cp Part I

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!
You can also find further discussion and get answers to your questions over in #get-help.

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head to #get-help and #community:tips-and-resources. If you are wanting feedback or inspiration for a project, check out #project.

Looking for motivation to keep learning? Join our wider discussions in #community

Learn more about how to use this guide.

Found a bug? Report it online, or post in #community:Codecademy-Bug-Reporting

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

I’m in the cp command tutorial, part 5. I’m being asked to copy cleopatra.txt from /biopic to /historical.

My command was cp cleopatra.txt /home/ccuser/workspace/movies/drama/historical

Did I do something wrong? The exercise asked me to copy from one place to another, and I can easily see the text in the other directory.

The hint says to change to the /drama directory before copying cleopatra.txt from ./biopic to ./historical/. I have copied the file - for which there appears to be no content - but the step #5 does not check off.?

What was the exact command you used? If you copied it correctly, you should be able to see the file in the historical directory. Additionally, some of the exercises in this course require an exact command to be inputted (yours may have accomplished the same thing but you’ll only pass if you put in the exact command the LE is looking for).

I successfully copied cleopatra.txt directly from the current directory without changing the working directory first, using:

cp cleopatra.txt ../historical

I confirmed this copied properly, but wasn’t able to proceed until I cd’d back to the higher directory and copied the file again from there. Seems an arbitrary requirement to force a single method of proceeding if there are other methods (already learned!) which work just as well.

Also – if anyone finds out how to disable this awful red popup text whenever you pwd or ls to confirm where you are in the directory tree, please let me know! confirming where you are is a basic part of using the command line, and we shouldn’t need to close a popup every time we do so.


I am just starting this chapter but I am already stuck in the first step,

I wrote cd biopic/movies and us “ls” later on, is there something I did wrong?

Take a look at the filesystem. Would using cd biopic/movies be a valid command? No, since movies is not a child directory of biopic. What is the right command and argument you need to use?

i am in biopic and trying to copy frida into lincoln by - cp frida.txt/lincoln.txt

but it wont work? what am i doing wrong?

Welcome to the forums!

The format for copying the contents of one file into another is as follows, where source is the file you want to copy from and destination is the file you want to copy to.

cp source destination

What change do you need to make?

oh, I see, I should be more careful on this one! thanks

but for some reason, I can’t zoom in on the picture!

Yep, unfortunately you can’t do that in the learning environment. Try right-clicking on the picture, then clicking “Open image in new tab” or something along those lines.

oh I okay, thank you so much!

1 Like

In step 2, does the command “cp frida.txt lincoln.txt” overwrite the previous contents of lincoln.txt, or was it simply empty before (because in step 3 when I “cat lincoln.txt”, all that prints is the Frida Kahlo information)?

yeah, it will overwrite content of lincoln.txt, you can use “cp -i frida.txt lincoln.txt” so it will ask you did you overwrite the lincoln.txt.

Hi all!
I swear I’m doing something stupid, but I’ve been banging my head on and off on this for a few days and nothing is working. I;m in the cp Part 1, on the first step. The instructions are to navigate to drama/biopic in one command and then list all files and directories using the ls command. The commands I used are:
cd /home/ccuser/workspace/movies/drama/biopic/
I get an error saying that I should use cd and the right file path and then use ls after I have done so.

Any help is greatly appreciated.

1 Like

It’s probably just a very restrictive test and they’re actually looking for cd drama/biopic, the relative path, instead of the absolute path.

Touche! You are correct sir! Thanks very much!

can you tell me how I can then answer the question? So I’m at the point where he asks me if he should overwrite lincoln. Unfortunately I don’t know how to answer :see_no_evil: :woman_shrugging:

I was having the same problem. Playing around I found you can go to the edge of the picture, when the curser changes you can drag and open the picture larger.

1 Like