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
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
)
locate *.pl
andlocate *.pm
seem to find all the scripts and objects, and I hope that's what you meant.