We all know this. We need to do a specific task and with the help of the internet we find a specific tool alongside command line parameters to do the job right from the shell.

What is a good way of collecting/documenting these snippets on your own for future reference and use? Just a text file in the home folder?

  • nycki@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 days ago

    i use a joplin notebook. its like a private wiki, and it works on android too.

  • redxef@feddit.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 days ago

    I just keep my history file around and have set it up to never truncate. Then grep or ^R.

  • corvus@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    6 days ago

    commands.txt every command with a one line description and a separator.

  • wewbull@feddit.uk
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    Just learn the basic POSIX commands (there’s probably 20-25) and understand pipes. Then you can do pretty much anything you’re likely to need from the command line. Sure, there will be more modern flashy friendly tools that come along. Some you’ll integrate into what you do. Some won’t have enough staying power to remember.

    No notes. No googling or LLM. Just don’t skip to the end.

  • harsh3466@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    7 days ago

    I take notes in Joplin with the command and a breakdown of any flags, parameters, etc, and what they everything means/does.

  • lime!@feddit.nu
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    6 days ago

    i usually get to where i’m going using man pages rather than copying wholesale from the web, but when i find something worth saving i usually put the snippet in its own script in ~/.local/bin, which is in my PATH. with some modifications to make it generic, of course.

  • eru@mouse.chitanda.moe
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    7 days ago

    spend more time in the shell. you will naturally learn the most commonly used commands and useful flags for them. soon you will be surprised by how much you know. having good typing speed helps reduce the friction a lot. i have not found need to specifically “memorize” anything consciously.

    for obscure things, write a script and put it in a scripts folder, have a comment at the top explaining what it does for reference later.

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

    I just use Zsh’s command history, coupled with a bunch of functions and aliases to set up different HISTFILE values for different workflows.

    I keep HISTFILEs clean by prepending a whitespace before commands that I don’t want to remember, which unfortunately gave me the habit of doing that on Bash when Zsh isn’t available (which is ineffective at best, and actively annoying at worst).

  • whoareu@lemmy.ca
    link
    fedilink
    arrow-up
    16
    ·
    7 days ago

    There is a command called tldr. it’s works similar to what you have described.