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.

1 Like

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!”