Hacker News new | ask | show | jobs
by _wldu 1552 days ago
Some people seem to be unaware of apropos too (old text based cli tool).

    $ apropos network
    interfaces (5)       - network interface configuration for ifup and ifdown
    aseqnet (1)          - ALSA sequencer connectors over network
    byteorder (3)        - convert values between host and network byte order
    ctstat (8)           - unified linux network statistics
3 comments

I hate that it spews so much irrelevant things. Run "apropos directory" on macos and see if you can find "ls" between

create_automation_image_overlay(8), -(8) - ."====================== create_automation_image_overlay overlay automation image content onto another directory ." ."

and

CPANPLUS::Internals::Source::Memory(3pm) - In memory implementation n .SS "$cb->_|_memory_retrieve_source(name => $name, [path => $path, uptodate => BOOL, verbose => BOOL])" .SS "$cb->_|_memory_retrieve_source(name => $name, [path => $path, uptodate => BOOL, verbose => BOOL])" Subsection "$cb->__memory_retrieve_source(name => $name, [path => $path, uptodate => BOOL, verbose => BOOL])" This method retrieves a storabled tree identified by $name. It takes the following arguments: name" 4 Item "name" The internal name for the source file to retrieve. uptodate" 4 Item "uptodate" A flag indicating whether the file-cache is up-to-date or not. path" 4 Item "path" The absolute path to the directory holding the source files. verbose" 4 Item "verbose" A boolean flag indicating whether or not to be verbose. Will get information from the config file by default. Returns a tree on success, false on failure. n .SS "$cb->_|_memory_save_source([verbose => BOOL, path => $path])" .SS "$cb->_|_memory_save_source([verbose => BOOL, path => $path])" Subsection "$cb->__memory_save_source([verbose => BOOL, path => $path])" This method saves all the parsed trees in storabled format if Storable is available. It takes the following arguments: path" 4 Item "path" The absolute path to the directory holding the source files. verbose" 4 Item "verbose" A boolean flag indicating whether or not to be verbose. Will get information from the config file by default. Returns true on success, false on failure

Let's say I forgot how to call `ls`, then I'd run `apropos directory` with ` | grep -i list` appended afterwards. Full command would be:

    apropos directory | grep -i list
And now it's just 7 options, where `ls` is easy to find :)
I'm aware of apropos, but I usually forget how the command is named.

edit: I forget how apropos is named.

    alias halp=apropos
I used to have a hard time remembering apropos because I assumed 'apropos' was some sort of unixy mincing of another word or abbreviation or something, and I couldn't figure out what it meant. You know, like 'mkdir' means "MaKe DIRectory"

But it turns out apropos is just a regular word. Once I learned this, I haven't had any more trouble with it.

apropos : Of an appropriate or pertinent nature.

https://en.wiktionary.org/wiki/apropos

Ohh I always thought "apropos" was from the French expression "à propos (de)... " which means "about". I naïvely believed that the person who coded this command must be French.
The English usage is borrowed from French![0] However, it doesn't look like the original author was French[1]. I shouldn't be, but I am quite surprised to see that the apropos command as we know it is 43 years old!

[0] https://en.wiktionary.org/wiki/apropos [1] https://www.mankier.com/1/apropos.mandoc#History

It's an ordinary word in Danish, meaning 'about something'. It can be used at the start of a sentence. Example: "Apropos vegetables I hate tomatoes".
You are correct about the origin except it came from French into English long ago.
Which is exactly the use case for apropos, which searches "the manual page names and descriptions"[0] for whatever term you've entered.

[0] https://man7.org/linux/man-pages/man1/apropos.1.html

man -k has been working just fine for me for 30+ years
Apropos has the compelling feature that I get to feel clever for knowing the word.
Just don't be one of those people who go around saying 'hehe apropros of nothing mirite' at seemingly everything!

(Also, `man --apropros` is the long option fwiw. I'm not really suggesting that as a better alternative though!)

I believe man -k just runs apropos.
Yep! man -k even has an ISO standard with which apropos is compliant https://www.mankier.com/1/apropos.mandoc#Standards
Right. There's often a tension between features and ease of use.
TIL about the -k option. Whoa.
ding.