Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

OpenSUSE 12.01, KDE, kernel 3.1.9-1.4-default

Trying to get all man pages. Basically the answer is apropos . or man -k .. Why does apropos \* only returns about 300 man pages while apropos . returns close to 60,000 and in a lot less time? I get that the former is doing a search and compare op and therefor is slower while the latter just belched out whatever it found. However, why does \* becomes a search operation while ., also a regexp, becomes a listing operation?

PS: apparently I had to type \\\* to get \*, interesting.

share|improve this question

1 Answer 1

To begin with, try the following commands in a terminal:

echo *
echo \*
echo '*'

The unquoted/unescaped asterisk will be expanded before apropos gets it, and will thus do as many searches as you have files in the current directory.

apropos '*' is an invalid regex search; you'd need apropos '.*' ("match any character 0 or more times"), but that will give the same result as just apropos ..

share|improve this answer
    
Cool, I struggled with that for a while with my first bash script. Completely forgot. Thanks, –  VNElectric May 10 '12 at 15:55

Your Answer

 
discard

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.