FAQ: Manipulation - mv

This community-built FAQ covers the “mv” 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 mv

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!

There is a bug in MV Q4. The txt files were in the wrong place. One was already in superhero. I moved it out and then moved back in with the other requested txt but I still cannot progress. My learning is stalled please resolve urgently. I have filed a bug last night but I have no response yet.

1 Like

I resolved this issue by realising that the course was expecting me to enter commands when in action as the PWD.

I’m stuck on this too. What was the exact command or list of commands you used to bipass this?

This is borked just like the last lesson, wonderwoman.txt is outside directory superhero and batman.txt is already within, i’ve moved Batman.txt out then moved them back in, moved just wonderwoman, moved them both in then out, erased them both then created new files in action/ then moved them back in and it all fails

The first step using pwd also fails because they want you to check your directory and execute an argument based on the information but running pwd fails as two steps are not completed as one

report the bug under ‘get unstuck’ in the upper right

Yep I thought the same thing because in the filesystem layout sheet they provided it shows that Batman.txt is within the superhero folder. But if you $ pwd you should find yourself in the Action folder. From there $ ls and you should get ‘batman.txt matrix-reloaded.txt matrix-revolutions.txt matrix.txt scifi superhero wonderwoman.txt’. This shows that the batman file is outside of the superhero folder. I believe that the filesystem layout sheet is incorrect.

I think I have a bit of the same confusion on the mv command section.
as I went from section to section 5 to 6 or 6 to 7 i learned the first thing to do is check both the pwd and ls to find were this new section is starting on the tree. Section 5 ends at action or superhero ( I can not go back to check) section 6 starts at a different place on the tree. At the beginning of each section test for your location. PWD then list LS. Check out were you are on the tree follow directions from that point. How to see the tree? near the top of the page just above the first question is a high lighted "here " click on that to see the tree.

Should we always use the relative path to the files if the files that we are trying to rename aren’t part of the current directory?

It works if you move both wonderwoman.txt and batman.txt all the way into movies, then mv batman.txt wonderwoman.txt action/superhero

Hello, I don’t know what I’m doining wrong in my answer?

There’s a couple of possible issues that are worth trying out. So far as I’ve interpreted the instructions you should not be in the superhero/ directory, you should be in /home/ccuser/workspace/movies/action and all previous tasks required the use of relative paths. Try changing back to the action/ directory before attempting this instruction.

So the command to view the contents of the superhero directory with a relative path would then be ls superhero.

Based on the previous instructions it looks like there should also be a superman.txt file in the superhero/ directory. Try following the instructions from the start just to make sure you’re in the right working directory, using relative paths for the tasks and making sure the contents of the directory are as expected.


yes! it worked, I did the exact steps you described,

thanks very much, tgrtim

Best regards Michel from the Netherlands

1 Like

batman.txt doesn’t exist in my folder should i just make it using touch?

resolved my issue on step 6 by resetting the excercise and going at it again. “if at first you don’t succeed, try try again!”


Well the only ways I would know how to do it are to either use the relative path or change directories. If you need to stay in the directory you’re in than relative path seems like the right way to go, but if it’s more convenient to change directories then why not? Obviously if the exercises are telling you to do it a specific way than that’s the way they want you to do it, but other than that, if your working in the terminal separately from the exercises, :man_shrugging: do what ever feels comfortable I guess, it will work either way.

Maybe there’s a best practices way to do it, depending on the situation, but I don’t know what it is. Would like to learn it though since I am a total beginner and don’t really know what I’m talking about. Just trying to learn by asking questions and giving whatever help I think I can.

Hi guys,

Could someone clearly explain how to get past Q4? Really enjoying my experience but havent been able to get past it…I think its a bug.

I had some issues with this exercise as well:

  • Step 1.: Got stuck rigth from the start. The error message always prompted me to use $ pwd, even if I was already in the action/ directory.
    Solution: Use “Get Unstuck” - “Reset Exercise”. Use $ pwd, then proceed as expected.

  • Step 4.: batman.txt was already inside superhero/.
    Solution: Use $ mv superhero/batman.txt . ← this moves batman.txt into your working directory, which should still be action/ (pay attention to the single . I used as target directory). You should now be able to resolve the step.

Anyway, filled in a bug ticket for this one as well :slight_smile:

1 Like

Lesson - mv
Stuck in first step - ls action/ not working while I am already lisiting the files

Im also stuck here. have you been able to figure out a way to move forward ?

Why the first part accepts the “direction/” but not “direction”? Using “direction” i can also get the right place and list the content.