FAQ: Manipulation - Wildcards

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

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!

How Can I reset the exercise?

type clear, then enter
then check where you are with pwd, then ls. If you want to go back type cd …/

Hi ! This is not an actual answer to the previous posts as I can’t see them, but I guess I’m stuck on the same Wildcard exercise : https://www.codecademy.com/courses/learn-the-command-line/lessons/command-line-manipulation/exercises/wildcards-command-line-manipulation

I don’t understand why after doing

```cp m*.txt scifi/``

in the action/ directory, and then ls I end up with these files :

batman.txt scifi superhero superman.txt wonderwoman.txt

on top of the files starting with m.

Before writing ls, I had written ls -a, maybe that’s why, but I cleared the shell, rewrote the whole exercise but Bash seems to be unforgetting.
So is this the mistake I made ? Should I come back tomorrow on the exercise, see if Bash has finally forgotten or is there something else to do ?
Thank you in advance for your answer !

Found it !
We have to write ls scifi/ although we already are in scifi/. ls is not enough.

Can somebody tell me where I got it wrong - I don’t know where to put the * in!

We want to copy all the files in the current directory into satire. Right now, you’re trying to copy only files with certain characteristics. Take a look at the first example provided in this lesson; it demonstrates how to copy all the files from one directory into another.

1 Like

I am being flagged even though I successfully copied both shrek.txt and the-office.txt into the Satire directory.

Screen shot

I am unable to move forward with the lesson. Is this a bug?

I’m having the same issue, pretty certain i’ve completed what the step asked but cannot move on.

Disregard, was using the wrong syntax

This does not reset the exercise, this just clears the console. To reset, click the x at the top of the console and then click the + to open a new console

The problem is that earlier in the lesson, we are taught that there are “files” and “directories” and that they are separate objects which is true. In these instructions we are told to copy all the “files” in the current directory when in fact, in order to get passed this step one has to copy all the files and folders despite the instructions not mentioning this.
Once you copy all the files and folders to the destination, the step is updated to completed.
Someone should fix the instructions to included “Directories” or “Folders”.

I was replying to someone else in this thread with a different issue.

However, with your problem, the command you need to use, cp * satire/, does not copy the directories, it only copies files. You need to copy all the files in the current directory, regardless of their file extension. Using *.txt, you will only copy text files (although there are only text files in the current directory, the lesson is trying to teach you that you can move all files quickly and with few keystrokes by just using *).