• GammaM
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    1 year ago

    pv, which is like cat, simply copying files or stdin to stdout, but prints statistics to the terminal.

    A related tip: dd isn’t special in the way most people use it. This works too, if you’re root: pv my-fav-distro.iso > /dev/sdc

  • FiveAcres
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    In Bash, I like to use cdargs

    sudo apt-get install cdargs

    It allows you to set up shortcuts on the fly,

    cv sdbackup

    rather than cd /media/user/Backup Plus/ MyFiles/current/sdbackup

    cv with no argument will give you a list to select from current shortcuts

  • Algae
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    My answers (mostly running in powershell - not that it makes much of a difference!)

    Rust-based utilities I couldn’t live without:

    • fd (fd-find) for finding my files
    • rg (ripgrep) for string searches
    • sd (sed) for search and replace
    • dust (dust) for information about my directories
    • lsd (aliased to ls or l) for replacing Dir
    • bat (better cat) - for when the help pages are too long

    Other stuff I love:

    • htop - I just learned you can run this in WSL to see all your system cores. It’s pretty!
    • nvim - obviously. The best vim. Even works in VSCode
  • RandomDevOpsDude
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    I write a lot of bash scripts that end up running in automation in some fashion.

    #!/usr/bin/env bash
    
    set -euxo pipefail
    

    Is pretty standard for me.

    -e exit on error

    -o pipefail exit on pipeline fail

    -u error on unset variables

    -x trace

  • cd_slash_rmrf
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    if you spend a lot of time in the shell, i like using the following for easier directory traversal:

    • fzf and its shell bindings for fuzzy-matching arguments
    • z for jumping to “frecent” directories
    • zsh-z (a native zsh port of z)
    • bd for going back directories

    and some zsh settings which make cd silently act like pushd/popd:

    # autopushd         : make cd act like pushd (alias doesn't work properly)
    # pushdminus        : use -1 instead of +1
    # pushdsilent       : prevents printing stack on each cd
    # pushdtohome       : `pushd` to ~/
    # pushdignoredups   : dont add duplicates to stack
    
    • GammaM
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I want to add setopt autocd, and hash -d name=/some/long/path/to/name to create your own ~name shortcuts.

  • fallenpixel
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Always partial to yq and jq. No easier way to interact with kubernetes outputs on the fly.

    • RandomDevOpsDude
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      How I have never heard of yq, I’m unsure, but thank you as I’m sure it will make life easier

    • Andy
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I don’t know about k8s work in particular, but I enjoy jello and yamlpath more than jq and yq.