I dont enjoy web searching every time. Id like to just have some sort of document I can read or search to find certain commands.

I do have the man pages on kiwix but is a little complex to navigate. Like if I want to learn how grep works, what’s the best way. Or if I forgot lshw, how do you go about looking up a command that does a certain thing like list out hardware etc.

Showing examples would be super helpful too, like “here’s a typical dd command for a drive image clone”

Preferably a desktop/android app or something that helps with this would be nice.

  • sga@piefed.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 day ago

    maybe programs liek navi (or any of the other billion snippets managers) can help you. essentially, these have list of commonly used commands, and then you open it with some keybinding, and you will search, lets say git commit (you know you want to commit, but lets say you forget that flag to give in line message is ‘-m’, then command git commit -m "message" would appear. you would select it, and it should either be typed into terminal, or copied to clipboard, or some other way to quicly enter it. some others do this by autocompleting from suggestions. I have something handrolled for the purpose (which is not in a state to be recommended to others), so i would say just search snippet/command manager/helper/complete, and you should get tonnes of them. i remember one of them, that is navi.

    you may also like to check out fish shell (or if you do not mind setting up zsh, if you want posix compatibility as well), as it has a very superior (compared to ootb bash) autocomplete, which will complete commands, and their flags, and sometimes also gives description of what that subcommand/flag does.

  • SethranKada@lemmy.ca
    link
    fedilink
    English
    arrow-up
    12
    ·
    2 days ago

    I use tldr myself, but it’s just an easier to read version of man pages, so it doesn’t directly help with what your asking for. Sorry

  • Lka1988@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    2 days ago

    I collect things and put them in my personal notes for reference later.

    Naturally, I end up googling it anyway.

  • Onno (VK6FLAB)@lemmy.radio
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 days ago

    The commands man and apropos are your friends to get you started.

    Learning how to use specific tools like grep, sed and awk is a case of getting started by using them. Most of the subsequent learning process will focus around how to create regular expressions (regex), for which there’s also a manpage.

    The “typical example” for a dd command is like saying, “here’s a great way to shoot yourself in the foot”. A better way is to understand that most of these tools follow the UNIX philosophy:

    1. Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new “features”.
    2. Expect the output of every program to become the input to another, as yet unknown, program. Don’t clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don’t insist on interactive input.
    3. Design and build software, even operating systems, to be tried early, ideally within weeks. Don’t hesitate to throw away the clumsy parts and rebuild them.
    4. Use tools in preference to unskilled help to lighten a programming task, even if you have to detour to build the tools and expect to throw some of them out after you’ve finished using them.

    Once you “grok” that, you’ll be in a much better place.

  • strlcpy@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 days ago

    man, but preferably BSD ones. They’re terrific. It pays to get comfortable with the pager (man less), but for web rendering, https://man.openbsd.org/ is great. I don’t know why these other man sites use monospace fonts, the language man pages are written in was literally made for quality typesetting!

  • masterofn001@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    2 days ago

    Does nobody use info?

    So much more in depth than any manpage.

    Granted it doesn’t contain every app installed, but it gives very detailed and very verbose explanations, examplea, options, use cases, caveats, warnings, etc, for all of the most essential commands and functions

    $ info
    

    In the program these are basic commands :

    -I # sets searching to always case insensitive -very necessary (upper case I)
    
    / # search for pattern
    
    n # search forward
    N # search back
    

    You can also search from command line using

    Info -k [pattern]
    
  • jutty@blendit.bsd.cafe
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 days ago

    I wrote a small script that takes a query as its single argument and if it finds a matching filename in a given directory it shows that in a pager. If it doesn’t, it uses ripgrep to search inside that directory and returns the filenames in a picker. If I prepend the filename with e, it opens that file (either existing or new) in an editor. Then I track that directory with Git.

    This way I have a quick way to store, find and retrieve notes from the terminal itself.