• Jess@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    14 days ago

    tldr because I am too impatient to read through man pages or google the exact syntax for what I want to do.

    • pixelscript@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      14 days ago

      There are exactly three kinds of manpages:

      1. Way too detailed
      2. Not nearly detailed enough
      3. There is no manpage

      I will take 1 any day over 2 or 3. Sometimes I even need 1, so I’m grateful for them.

      But holy goddamn is it awful when I just want to use a command for aguably its most common use case and the flag or option for that is lost in a crowd of 30 other switches or buried under some modal subcommand. grep helps if you already know the switch, which isn’t always.

      You could argue commands like this don’t have “arguably most common usecases”, so manpages should be completely neutral on singling out examples. But I think the existence of tl;dr is the counterargument.

      Tangent complaint: I thought the Unix philosophy was “do one thing, and do it well”? Why then do so many of these shell commands have a billion options? Mostly /s but sometimes it’s flustering.

  • renzev@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    13 days ago

    tldr is great. Basically a crowd-sourced alternative to man with much more concise entries. Example:

    $ tldr dhcpcd
    
      DHCP client.
      More information: <https://roy.marples.name/projects/dhcpcd>.
    
      Release all address leases:
    
          sudo dhcpcd --release
    
      Request the DHCP server for new leases:
    
          sudo dhcpcd --rebind
    
  • Dr. Moose@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    12 days ago

    I really like how nushell can parse output into it’s native structures called tables using the detect command.

    Unlike string outputs, tables allow for easy data manipulation through pipes like select foo will select foo key and you can filter and even reshape the datasets.

    This is great if you need to work with large data pipes like kuberneters so you can do something like:

    kubectl get pods --all-namespaces | detect columns | where $it.STATUS !~ "Running|Completed" | par-each { |it| kubectl -n $it.NAMESPACE delete pod $it.NAME }
    

    This looks complex but it parses kubectl table string to table object -> filters rows only where status is not running or completed -> executes pod delete task for each row in parallel.

    Nushell take a while to learn but having real data objects in your terminal pipes is incredible! Especially with the detect command.

    There’s are few more shells that do that though nu is the most mature one I’ve seen so far.

  • lud@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    13 days ago

    As primarily a Windows admin (Yes, we exist on Lemmy ;) ) here are few I use often.

    • Enter-PSSesion
    • Get-ADUser (also group and computer)
    • CLS (aka the superior clear)
    • ii . (short for Invoke-Item . which runs the selected object using the default method. For paths (like .) the default is explorer, so ii . opens the current directory using explorer.)
    • ft (short for Format-Table formats piped input as a table.)
    • fl (short for format-like. Used like ft but for lists.)
    • Where-Object
    • Select-Object
  • Bob@feddit.nl
    link
    fedilink
    arrow-up
    0
    ·
    13 days ago

    I use “ping” every time I suspect my internet might be going a bit slow.

    • LordCrom@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      13 days ago

      Try mtr . It’ll run kinda like a trace route but will show you where the delay is happening. Still relys in icmp not being blocked

      • Bob@feddit.nl
        link
        fedilink
        arrow-up
        0
        ·
        12 days ago

        ‘mtr’ is not recognized as an internal or external command, operable program or batch file.

        I assume I’m on the wrong OS.

  • I Cast Fist@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    13 days ago

    More of a shortcut, CTRL + A + D to exit the current session (exits a sudo su first, then a ssh, then the actual terminal)