Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the command line, the wildcards do not seem to work. Am I just old-school and they are not used. The manuals seem to describe them. A search command for *.pl should find all perl scripts...

And *.pm should find all perl objects. thanks john

share|improve this question
You've not posted the command in question, which makes it a bit hard to understand the question. locate *.pl and locate *.pm seem to find all the scripts and objects, and I hope that's what you meant. – mikewhatever Dec 4 '12 at 22:49

If you are in the directory of the scripts you need to use ls *.pm, if you want to search the subdirectories as well you are better of with the find command, you would then use

find . -name '*.pm'

The first argument is the parent directory to use: the dot means from the current directory and down, if you use / this means that the whole filesystem will be searched, depending on your files this might take a while.

I don't recommend using the locate command because it gets the information from a database that might not be up-to-date. So if you add a file it won't show up in your output unless you force the database to update by

sudo updatedb

See also the man pages for more info about these commands (eg. by doing man find)

share|improve this answer

sometimes wildcards or special ciphers need a mask with '\' - backslash before every special cipher resp. wildcard ! ( the backslash is invisible in this block rather ... )

then type ... \*.jpeg instead of ... *.jpeg

or for example:

cp /home/user/\*.jpeg /home/Downloads/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.