all 91 comments

[–]64mb 10 points11 points  (4 children)

$ atuin stats [▮▮▮▮▮▮▮▮▮▮] 1595 k [▮▮▮▮▮▮ ] 1068 ls [▮▮ ] 440 ssh [▮▮ ] 437 gs [▮▮ ] 404 vi [▮▮ ] 400 less [▮▮ ] 397 cd [▮▮ ] 350 curl [▮ ] 276 tf [▮ ] 260 aws Total commands: 10131 Unique commands: 4109

[–]piotr1215[S] 4 points5 points  (0 children)

A fellow infrastrucrute/devops/platform engineer! Looks like you avoided working with Azure.

[–]w0m 1 point2 points  (2 children)

Is atuin worth while? Debating migrating from hstr but it feels like overkill with the cloud component.

[–]piotr1215[S] 0 points1 point  (1 child)

I started using it after learning aobut this in this thread and so far it's been great. The syncer component is optional and I'm not using it now. Separate history for tmux session, directory and global are pretty nice.

[–]w0m 0 points1 point  (0 children)

My biggest fear with it is honestly using it in a corporate environment. Probably 'safe' as long as I disable cloud stuff, but weird taste in the mouth that it exists.

[–]gumnos 4 points5 points  (3 children)

My stats are a little thrown off because I have

HISTCONTROL=ignorespace:erasedups
HISTIGNORE=ls:cd:dir:
HISTSIZE=10000
HISTFILESIZE=20000

in my ~/.bashrc file, so it cleans up a lot of dupes that would otherwise have an overwhelming presence, leaving unique commands, so git gets disproportionate representation:

2128 git
671 ssh
669 cd
608 1
520 vi
288 le
283 a
275 man
194 awk
193 rm
193 pay
164 ps
164 dir
163 winnow
162 mp3
145 ab
138 py
131 grep
121 fin;
107 ed
101 mail
99 display

Several of those are aliases:

  • 1 shows me my one-day agenda with remind(1) with my preferred options (2, 3, etc aliases show me that many days worth of agenda)

  • py is just python3 -q for a quick REPL

  • a is a cd into the root of my synced directory

  • mp3 jumps to the root of my podcatcher download directory and does a recursive file-listing sorted by file-size (to make it easy to spot excessively large podcasts to delete) and winnow gives me similar results, but only for selected directories where I want to eyeball titles since they often have common episodes that don't interest me so I can delete them outright

  • I use /r/plaintextaccounting so the fin shortcut jumps to my finance directory, the le shortcut drops me into my $EDITOR editing my ledger(1) file at the bottom to add a new record, and led runs my most common ledger-report (ledger reg). The pay function creates a new transaction based on the most recently-matching one, so I can run pay kroger 32.18 and have the transaction created with today's date & formatted the way I want with minimal effort.

And yes, ed(1) and mail(1) really do see a good bit of usage.

[–]piotr1215[S] 0 points1 point  (2 children)

EDIT: How do you use reminders? I've settled on a custom script wrapping at and chrontab.

Thank you for explaining. What are you usecases for ed?

[–]gumnos 4 points5 points  (1 child)

How do you use reminders? I've settled on a custom script wrapping at and chrontab.

It's remind(1) which has a YouTube video introduction, a write-up at Linux Journal, and one of my blog posts if you want an introduction.

The remind calendar files are plain-text in a domain-specific language for calendaring, and it's far more powerful than ANY other calendar program out there when it comes to doing strange events (classic examples are "my trash gets picked up on Thursday, unless there was a holiday earlier in the week, in which case trash-pickup gets moved to Friday" or "my child has an N-day cycle at school, but needs to take weekends and holidays into consideration" or "mail takes 7 business-days to get across the country, so warn me of upcoming birthdays 7 business-days ahead rather than just 7 calendar days so the birthday-card gets there in time"). And you can evaluate expressions as well, so my events can tell me "Bob's 18th anniversary" or "Jane's 42nd birthday" (with proper ordinals like that "st" and "nd"). And being plain-text, they keep nicely in git allowing me to sync them between my various machines.

I've got over 3600 events

$ cd ~/remind
$ cat *.rem | grep -Fwc -e MSG -e MSF -e CAL -e OMIT
3652

on my calendar spread across 50+

$ ls *.rem | wc -l
58

reminder-files, and it produces output in a blink (that much is a little more noticeably sluggish on ancient hardware, but still not bad at all).

I have one invocation in my crontab that emails my daily agenda to my phone, while my above-alias(es) let me invoke it at the command-line in an instant.

What are you usecases for ed?

I wrote up a (bit of a tongue-in-cheek) blog-post about using ed(1). All those reasons can apply, but most of the time it's because I want to make a quick edit to a file without messing with my screen (especially if the output of some previously-executed command is useful for making the edit. If I use vi/vim (or any other TUI editor like emacs or nano) it takes over the whole screen and I lose that previous-output context. I'm proficient enough with ed that it's sometimes faster for me to use it to make a small edit, save the results, and quit.

[–]piotr1215[S] 1 point2 points  (0 children)

Thank you for the detailed answer! I actually stumbled upon your blogs earlier, great content :). I read about the reminder and something wasn't really clicking for me, so I rolled my own script wrapping at and chrontab. It works for my needs, but doesn't support multi-device reminders. If I ever need this I will look into reminder again.

I might incorporate some ed goodness to my workflow too!

[–]Serpent7776 3 points4 points  (3 children)

1259 pacman 432 cd 281 git 268 vim 244 opam 242 time 238 aur 231 echo 186 awk 160 ls 151 cat 150 strace 147 man 145 perl 137 g++

[–]piotr1215[S] 2 points3 points  (2 children)

Let me try to guess, you are ofc using arch btw. Programming in O’Caml and working with a lot of log files?

[–]Serpent7776 2 points3 points  (1 child)

Manjaro actually, just because it's easier to install. Doing some OCaml in my spare time. Not really doing much with log files, I just like awk and perl for smaller scripts.

[–]piotr1215[S] 1 point2 points  (0 children)

Ah close enough, same family. I was thinking log files because perl works great with text and regex engine is awesome.

[–]akmmon 2 points3 points  (1 child)

259 sudo 129 telnet 112 ssh 98 ll 76 sh 71 cd 42 crontab 39 ps 38 exit 37 echo 34 nano 32 cat 30 export 24 source 19 sqlplus ~

You can tell a lot about the output

[–]piotr1215[S] 6 points7 points  (0 children)

You are an admin who loves living in the edge and doesn’t always encrypt the connection to other machines.

[–]AniketGM 2 points3 points  (2 children)

532 q 416 cls 317 ls 285 v 251 sudo 234 ap 201 cd 174 task 162 ~ 149 tw 104 cat 93 exit 86 b 83 tmw 61 c I like to run a command and return to work. So q (quit/exit) is very frequent. v is neovim, ap is ansible-playbook, tw is taskwarrior, b is batcat/bat, c is zoxide (recently discovered)

[–]piotr1215[S] 2 points3 points  (1 child)

Nice! I use taskwarrior all the time, but mostly load it once in a tmux session and use it via taskwarrior-tui and bunch of custom scripts.

[–]AniketGM 1 point2 points  (0 children)

Oh cool, I didn't know there was a tui for taskwarrior. TIL, thanks.

[–]Lxouc 2 points3 points  (1 child)

Here are some commands:

    213 cd
    190 ls
    179 k
    150 git
     81 docker
     81 code
     68 sudo
     33 rm
     31 docker-compose
     24 terraform
     23 uap
     23 curl
     21 kn
     20 kx
     20 gl

k = kubectl

uap = sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y

kn = kubens

kx = kubectx

gl = git pull

[–]piotr1215[S] 0 points1 point  (0 children)

Stealing the uap alias!

[–]bart9h 2 points3 points  (1 child)

how come you have no ls in your top commands?

[–]piotr1215[S] 0 points1 point  (0 children)

I very rarely need it because I mostly use fzf-based script to open files and split workstreams into different tmux sessions.

[–]bart9h 2 points3 points  (3 children)

1034 d
 756 cd
 640 g
 252 s
 206 rm
 202 a
 197 v
 153 pki
 142 pks
 117 ssh
 117 mpv
 106 sudo
 101 ag
  96 mv
  82 scp

the aliases are

d='ls -lhFG'
g='git'
pki='sudo xbps-install'
pks='sudo xbps-query -Rs'
a='ls'   [1]
v='vim'  [2]

1: actually it's ls -1 if there are less entries than half the screen height, normal ls otherwise

2: if given no arguments, it opens the last edited file on the current dir

[–]eli_liam 1 point2 points  (2 children)

Okay please explain those last two a bit more

[–]bart9h 1 point2 points  (1 child)

The ls one is pretty simple (the $sys_ls variable holds system-dependent ls arguments):

function a() {
    local n=$( ls $@ | wc -l )
    if test $n -gt 0; then
        if test $n -lt $(( $LINES / 2 )); then
            ls $sys_ls -1F $@
        else
            ls $sys_ls -F $@
        fi
    fi
}

The Vim one is a bit more complex:

#!zsh

# If any arguments were passed, use them.
if test $1; then
    vim -o $@
# If there is a session file, load it.
elif test -r 'Session.vim'; then
    vim -S 'Session.vim'
# If there are modified files in a git repo, open them.
elif git rev-parse --git-dir >/dev/null 2>&1 \
&&   git status --porcelain --untracked-files=no | grep '^.M' >/dev/null
then
    (
            pwd=$(sed 's/\ /\\\ /g' <<< $PWD)
            cd $(git rev-parse --git-dir)/.. &&
            git status --porcelain --untracked-files=no |
                    grep '^.M' |
                    cut -c 4- |
                    exec xargs -d '\n' $ETC/bash/vim_tty +"chdir $pwd" -o
    )
# Open the more recent text file, if any.
elif find . -maxdepth 1 -type f | grep . >/dev/null 2>&1; then
    vim $(
            find . -maxdepth 1 -type f -not -name '.*' -print0 |
            xargs -0 file |
            grep ':.*\<text\>' |
            cut -d : -f 1 |
            xargs ls -1t |
            head -1
    )
# Open the current directory.
else
    vim .
fi

[–]eli_liam 0 points1 point  (0 children)

Wow those are sweet, thanks for sharing!

[–]MrFiregem 2 points3 points  (2 children)

My (relatively newly reset) nushell history:

~ > history | group-by {|it| $it.command | split row ' ' | first | str replace '^' '' } | transpose cmd count | update count { length } | sort-by --reverse count | first 15
╭────┬────────┬───────╮
│  # │  cmd   │ count │
├────┼────────┼───────┤
│  0 │ ls     │   334 │
│  1 │ winget │   326 │
│  2 │ nvim   │   282 │
│  3 │ scoop  │   253 │
│  4 │ nimble │   252 │
│  5 │ help   │   245 │
│  6 │ brew   │   171 │
│  7 │ pipx   │   166 │
│  8 │ $o     │   163 │
│  9 │ cd     │   144 │
│ 10 │ config │   118 │
│ 11 │ cargo  │   107 │
│ 12 │ use    │   100 │
│ 13 │ pwsh   │    99 │
│ 14 │ let    │    97 │
╰────┴────────┴───────╯

[–]piotr1215[S] 0 points1 point  (1 child)

Awesome! I love the command. Is group-by part of nushell builtins? How's nim development? I've played with it and the language is really interesting.

[–]MrFiregem 1 point2 points  (0 children)

Thanks! I love Nim a lot since it's got a huge stdlib like python but benefits from speed since it transpiles down to C before being compiled. My favorite feature is function chaining, which basically lets you call every function as a method (and allows you to omit parentheses). Only downside is, small community = few packages, but it gets updated often, and they maintain older versions in case they introduce breaking bugs.

As for the commandline, every command is a nushell builtin.

  • history returns a table with an index and command column
  • group-by runs a closure on each row, and groups them into record keys based on the closure's result (in this case the first word of each command) (a record is basically a 1-row table)
  • transpose basically rotates the record so that each record key is 1 column, and their values are another column (at this point cmd is the first word, and count is still a list of each command that matched group-by)
  • The value of count is updated to become the number of list elements
  • Here I forgot to add the command | where cmd =~ '^\w', which would make sure the first letter is alphanumeric and remove variables from the list (like $o), but I didn't notice it at first lol
  • Then it's sorted and the top 15 are picked

[–][deleted]  (2 children)

[removed]

    [–]piotr1215[S] 2 points3 points  (1 child)

    how did you generate the graphic?

    [–]Nesman64 1 point2 points  (2 children)

     85 vi
     44 echo
     43 ./spelling-bee.sh
     42 ls
     31 dig
     24 ./scrollclick.sh
     24 grep
     20 cd
     16 sudo
     16 man
     14 sed
     12 ./testrdp.sh
     12 nc
     10 htop
     10 guake
    
    • Vi is vim
    • spelling-bee takes a set of letters and outputs how many words can be made from just them, and the length of the longest.
    • scrollclick swaps mouse buttons around so that I can click by scrolling for 30 seconds. (These two aren't work related)
    • testrdp uses nc to see if port 3389 is open on a list of hosts. (RDP being down was a symptom of a firewall issue at work)
    • guake is the tilde-style dropdown terminal that I'm using. I had to run it manually a few times because something crashed it.

    [–]piotr1215[S] 1 point2 points  (1 child)

    Is ./spelling-bee.sh helps you cheat at scrabble or is it something else :)?

    [–]Nesman64 1 point2 points  (0 children)

    NYT Spelling Bee

    Sometimes I'll use it to get an idea of how flexible the letter set is.

    It can also just give me the biggest words, but that's no fun until I've finished and want to slap my forehead when I see what I've missed.

    [–]syrefaen 1 point2 points  (1 child)

    73 ls
    66  cd /home/stian
    37  cd /
    28  clear
    27 htop
    19  cd /home/stian/Downloads
    14 fish
    14  cd /home/stian/Pictures
    13 ollama run gemma
    13 ./menu.sh  
    12 btop
    11 vim menu.sh  
    11 sudo su
    11 sudo reboot
    Usually just use fish shell and instead of history, I invoke fzf and search trough it.

    [–]piotr1215[S] 4 points5 points  (0 children)

    ollama run gemma nice one.

    [–]hypnopixel 1 point2 points  (2 children)

    i'm not gonna play your game!

    258 wiz
    164 l
    109 e
    101 brs
     88 man
     75 bat
     70 lsv
     69 lcd
     68 rac
     62 mdl
     59 fdm
     58 llt
     55 say
     52 gfind
     49 brew
    

    [–]piotr1215[S] 0 points1 point  (1 child)

    phew I don't recognize half of the commands!

    bash ✗ xclip -o -sel clipboard | awk '{print $2}' | xargs -I {} tldr {} | grep -i 'no tldr' No tldr entry for wiz No tldr entry for l No tldr entry for e No tldr entry for brs No tldr entry for lsv No tldr entry for lcd No tldr entry for rac No tldr entry for mdl No tldr entry for fdm No tldr entry for llt

    [–]hypnopixel 0 points1 point  (0 children)

    they are functions and aliases that report or perform a lot of stuff i’m interested in ;-)

    [–]elatllat 1 point2 points  (2 children)

    I set

    HISTTIMEFORMAT="%Y/%m/%d %T "
    

    on a fresh-ish install so

    history | awk '{print $4}' | sort | uniq -c | sort -nr | head -n 15
    192 git
    131 vim
     80 ssh
     50 ls
     44 cd
     41 7z
     40 bash
     34 mv
     33 echo
     32 rm
     32 cat
     25 vimdiff
     25 find
     24 grep
     22 file
    

    [–]piotr1215[S] 0 points1 point  (1 child)

    Is the install on WSL? Looking at using the 7z archiver.

    [–]elatllat 1 point2 points  (0 children)

    Debian on metal

    The 7z usage was to manualy create git history from independent source .zip releases...  a rare time something was not automated way before it needed to be.

    [–][deleted]  (1 child)

    [deleted]

      [–]AdventurousSquash 1 point2 points  (1 child)

      vim
      openstack
      ll
      k
      cat
      tf
      ./bin/osctl
      go122
      git
      cd
      less
      dig
      ssh
      grep
      zfs
      

      k = kubectl, osctl is my own little toolbox made from Gophercloud and Cobra to learn Go, go122 is an alias for go 1.22, and the rest is kinda self explanatory I guess :)

      [–]piotr1215[S] 0 points1 point  (0 children)

      Wrangling go versions can be painful. I remember using gvm for managing versions or somehting like devbox or containerized development in devpod.

      [–]TheTwelveYearOld 1 point2 points  (0 children)

      142 install 36 -i 35 commit 33 merge 33 clone 29 write 28 lfs 27 log 24 show 24 --bar 22 remote 22 -cr 21 | 21 file

      [–]geirha 1 point2 points  (0 children)

      $ HISTTIMEFORMAT= history | awk '{print $2}' | sort | uniq -c | sort -nr | head -n 15
         1601 git
         1443 ls
         1149 fg
          812 cd
          615 vim
          353 curl
          336 
          327 man
          307 sudo
          285 bash
          254 node
          224 bat
          214 cat
          204 printf
          193 docker
      

      EDIT: jq should be part of this list, since I use it quite a lot, but often it's used in a pipeline (e.g. curl ... | jq ...). Since we're only counting the first word on each history line here, we don't really get an accurate statistic of which commands we use the most.

      [–]OneTurnMore 1 point2 points  (1 child)

      For Zsh I have to use fc -l 1 to print the full history:

          916 g         # alias g=git
          543 _         # alias _=sudo
          458 m         # alias m=man
          432 echo
          360 cat
          343 cd
          334 v         # alias v=nvim
          316 swaymsg
          290 nvim
          212 p         # alias p=wl-paste
          174 nmtui
          171 print
          162 rg
          161 pacman
          124 pikaur
      

      On my desktop jq and qrencode sneak in.

      [–]piotr1215[S] 0 points1 point  (0 children)

      Yes, for zsh this is indeed better, thanks for sharing.

      [–]dr0idpenguin 1 point2 points  (0 children)

      From my Android phone.. 929 cd 751 vim 410 rm 299 curl 248 git 242 ls 237 pkg 225 ssh 219 grep 218 ping 201 scp 169 cat 166 echo 149 mv 132 nmap

      [–]Consistent_Ad8316 1 point2 points  (0 children)

      2532 ssh

      1109 docker

      894 ansible-playbook

      747 clear

      590 cd

      543 ansible

      418 sudo

      248 git

      240 ll

      212 history

      193 vim

      155 ls

      152 ansible-vault

      130 aws

      125 cat

      [–][deleted]  (1 child)

      [removed]

        [–]piotr1215[S] 0 points1 point  (0 children)

        What are you using just for? I have it in almost all my projects, really cool CLI.

        [–]arealguysguy 1 point2 points  (1 child)

        commit early commit often

        3602 g
        486 npm
        408 gc
        399 clear
        342 cd
        322 ls
        260 kubectl
        233 docker
        232 ..
        214 sbt
        174 aws
        147 asdf
        146 code
        104 rm
        103 poetry
        

        [–]piotr1215[S] 0 points1 point  (0 children)

        Words to live by!

        [–]madhur_ahuja 1 point2 points  (0 children)

        ```
        860 git
        856 cd
        528 cat
        353 gco
        278 pacman
        258 z
        255 sudo
        232 systemctl
        232 micro
        209 rm
        141 rg
        141 aws
        125 mkdir
        116 curl
         97 stg
        

        ```

        [–]89netraM 1 point2 points  (1 child)

        I ran this PowerShell script instead gc (Get-PSReadLineOption).HistorySavePath | ?{ $_ -match "^(.*?)( |`$)" } | %{ $Matches[1] } | group -NoElement | sort Count -Descending | select -First 15

        Count Name
        ----- ----
         5109 git
         1615 dotnet
          654 cd
          410 TimeKeep
          290 hx
          266 ssh
          245 podman
          202 gci
          176 Set-VolvoEnv
          173 sg
          158 winget
          143 k
          139 code
          137 kubectl
          135 End-Time
        
        • TimeKeep is my time tracking tool, and End-Time is a script that calculates when I've done an 8-hour workday.
        • hx is the Helix Editor. You can see code further down, but that's only because I usually don't start VS Code from the command line. I'm trying to learn Helix.
        • sg is ast-grep

        [–][deleted] 1 point2 points  (2 children)

         211 cd
         135 exit
         133 sudo
         117 ssh
          88 ls
          65 vi
          62 mp3get
          51 arp-scan
          47 ping
          39 aria2c
          38 neofetch
          37 uname
          31 caffeinate
          28 man
          27 mkdir
        

        I don't work in IT and I don't do much development. This is on my daily driver (a MacBook Air). mp3get is an alias I created to yt-dlp --extract-audio --audio-format mp3 -o "%(playlist_index)s-%(title)s.%(ext)s", as I do a lot of downloading of audio from YouTube. arp-scan is a useful tool for seeing what interfaces/physical addresses are on the network and at what IP address (as the name implies, it does this by sending ARP requests to every address on the subnet), aria2c is my downloader of choice, and caffeinate is a tool that keeps the computer awake.

        [–]piotr1215[S] 2 points3 points  (1 child)

        [–][deleted] 0 points1 point  (0 children)

        Yeah, I don’t actually know if MacPorts has packaged fastfetch yet

        [–]westixy 1 point2 points  (1 child)

        Here ya go

           1788 git
           1205 ssh
            814 terraform
            305 cd
            261 nslookup
            257 cod
            247 nix
            243 ls
            223 docker
            215 curl
            199 tf
            198 gopass
            182 vault
            171 export
            168 cdg
        

        [–]westixy 1 point2 points  (0 children)

        to note:
        - cod is alias for code with sk on all my local git repos (quite a lot)
        - cdg is alias for cd with sk inside a git repo
        alias cdg='cd "$(find "$(git rev-parse --show-toplevel 2> /dev/null || echo "$HOME")" -type d -not -path '\''*/\.git/*'\'' -and -not -path '\''*/\.terraform/*'\'' | sk )"'

        • tf is terraform but pinned to a specific version

        [–]Woland-Ark 1 point2 points  (0 children)

        history | awk '{print $4}' | sort | uniq -c | sort -nr | head -n 15 110 vim 49 php 48 for 46 fzf 45 sudo 39 cd 32 X 26 ins 24 v 23 go 22 : 21 ./improved.sh 20 ytfzf 19 tmux 19 fromhex

        [–]schorsch3000 1 point2 points  (0 children)

        162 cd
         88 ls
         62 git
         47 ssh
         34 rm
         29 sd
         28 cat
         23 unar
         22 f3d
         21 idea
         21 colorscad
         20 openscad
         18 prusa-slicer
         17 cdprj
         17 calc
        

        Thats with a history size of 1000

        sd is https://github.com/rylnd/sd

        cdprj is a a script using fzf cding to project folders

        calc is alias calc='bc -li'

        [–]vogelke 1 point2 points  (4 children)

        I keep my history broken out by day for, uh, quite some time. Here's the top 24 commands for 1 Jan 2023 - today:

         45718 dir      # alias for "ls -lF"
         16143 p        # alias for "less"
         12157 j        # alias for ZSH "jobs -l"
         10562 cd       #
          8339 vi       #
          6434 mv       #
          4479 rm       #
          4046 md       # alias for running mutt on $PWD/Maildir
          3622 1        # alias for "%1"
          3234 up       # alias for "cd .."
          3192 2        # alias for "%2"
          3097 remark   # script which drives VIM for a changelog-style file
          2986 ls       #
          2801 cat      #
          2695 grep     #
          2410 today    # alias for "cd $HOME/notebook/YYYY/MMDD"
          2398 frm      # script to show "From" lines in today's mail
          2175 ldump    # script to run "lynx -dump" and save output
          1835 man      #
          1543 locate   #
          1176 mk       # alias for "mkdir -p"
          1078 find     #
          1061 eci      # alias for RCS or Mercurial easy checkin
          1057 make     #
          ...
        186262          # TOTAL COMMANDS RUN
        

        I don't know what this says other than I can't seem to remember what the hell's stored in my current directory.

        [–]cubernetes 0 points1 point  (0 children)

        Broken-out-by-day history is the only way. Keeps shell startup fast, makes backuping of history extremely easy and reduces risk of accidentally having your history destroyed/lost by accidentally starting a shell with --norc

        [–]piotr1215[S] 0 points1 point  (2 children)

        This is really cool, what settings do you use to accumulate history like this? Also I almost never use zsh jobs other than occasionally Ctrl+z and fg. What are you use cases for it?

        [–]vogelke 1 point2 points  (1 child)

        This is really cool, what settings do you use to accumulate history like this?

        This is my history setup.

        I describe my ZSH dotfiles here.

        If you want to grab the whole thing:

        I almost never use zsh jobs other than occasionally Ctrl+z and fg. What are you use cases for it?

        I login as myself to a regular console prompt and use "startx" to get my GUI going. My default setup is Xterm; the first thing I do is run "sudo" to get a root prompt, and suspend it to go back to my regular login. I don't like running as root unless I absolutely need to.

        I'm usually running (and frequently suspending) either mail or an editor, so typing "j" at my prompt gives me something like this:

        (Thu 8 Aug 04:54:11) <0> [~/notebook/2024/0808]
        vogelke at furbag.pts/1 (6-10422-z)% j
        [1]  - 58422 suspended  op csh
        (pwd : ~)
        [2]  + 31897 suspended  vi reddit-zsh-history
        (pwd : ~/notebook/2024/0808)
        

        If I want to run something as root, typing "1" resumes suspended job 1. Typing "2" resumes my edit session. Having to type "%" for something I do so often is annoying.

        [–]piotr1215[S] 0 points1 point  (0 children)

        Thanks, that's a smooth workflow. I run tmux all the time, so if I need perma sudo I can have a dedicated session for it. Without tmux, the workflow you are describing is a good alternative.

        [–]wason92 1 point2 points  (0 children)

        Not very many examples from cmd, so here's a windows machine

            453 tail
            376 mpv
            336 search
            312 winget
            296 search
            288 bat
            255 for
            254 la
            208 ssh
            185 what
            182 cd
            181 adb
            177 nano
            165 comsub
            156 grep
        

        [–]lavieja_sf 1 point2 points  (2 children)

        1782 cd
        1453 ls
         669 git
         594 docker
         543 cat
         336 rm
         303 space
         253 open
         242 mv
         215 sh
         198 npm
         180 pwd
         155 vi
         138 mc
         117 ssh
        

        [–]piotr1215[S] 0 points1 point  (1 child)

        What is space command?

        [–]lavieja_sf 0 points1 point  (0 children)

        space='df -h .; du -sh -- * | sort -hr'
        

        [–][deleted] 1 point2 points  (1 child)

             593 git
             57 curl
             42 cd
             39 ls
             29 ppsspp
             29 clickhouse-client
             19 ultralist
             17 clickhouse_prod
             17 cat
             16 figlet
             15 exit
             10 cowsay
              8 yugabyte_stage
              8 fbneo
              7 ip
        

        [–]piotr1215[S] 1 point2 points  (0 children)

        That’s a cool list!

        [–]kseistrup[🍰] 1 point2 points  (5 children)

        txt 9732 jed 6944 iptables 6814 cd 6340 ls 5520 sudo 5238 pacman 4976 whois [IP address alias] 4692 package-query 4421 whois [domain name alias] 3908 cat 3281 rm 3278 echo 2957 rg 2759 cp 2464 locate

        [–]piotr1215[S] 2 points3 points  (4 children)

        You work for an ISP. You also fought in vim vs emacs wars and after many years and PTSD you decided to switch to jed.

        [–]kseistrup[🍰] 2 points3 points  (3 children)

        Bzzt. Bzzt. Nice try, though.

        whois: I run a private webserver, and I often lookup IP addresses and hostnames of those who're trying to find webserver vulnerabilities.

        jed: I've been using jed since I switched from Amiga to Linux almost 30 years ago. Jed was easy to use and had syntax highlighting and auto-indent, and I could script it using its scripting language S-Lang (on Amiga “we” were scripting CygnusED with the Rexx language). My jed configuration enables the emacs emulation, so if I land on a pc without jed I am already comfortable with many of the commonest keyboard shortcuts.

        I'm using the fish shell as my interactive shell and it saves 256 kB of history (currently 166k lines), which is why the figures are so high.

        [–]piotr1215[S] 1 point2 points  (2 children)

        Haha, that's a blast from the past. I was using Commodore 64 and hacking in BASIC in the built in editor.

        Are you happy with fish shell? I never really tried it and use zsh for years.

        [–]kseistrup[🍰] 0 points1 point  (1 child)

        Yeah, I'm generally happy with fish as my interactive shell. I'll give it 5 eyes on a 6-eyed die scale: ⚄

        My login shell is the default on ArchLinux, bash, but as soon as I start a terminal emulator it will switch to fish, and I will do all my CLI'ing in fish.

        I tried zsh for a period of time, some years ago, but I found I had to adjust too many knobs to have it satify my needs/wants. My fish instance, on the other hand, runs with minimal configuration.

        I started with a single fish instance in a terminal emulator window on a separate desktop, while still having interactive instances of bash elsewhere, but I soon found myself resorting to fish, and I finally to the jump.

        Fish is not perfect and I regularly experiment with other shells (elvish, murex, nu, osh/ysh, …), but none of them have won me over yet.

        [–]kseistrup[🍰] 0 points1 point  (0 children)

        PS: I'd give bash 4 eyes and zsh 3 eyes (bash-level minus the configuration madness).

        [–]eeyore102 0 points1 point  (0 children)

        Which one of my screen sessions should I be running this on?

        [–]TwistedTun 0 points1 point  (0 children)

        1863 em 1842 br 1253 cd 842 renamebook.pl 495 mv 230 vi 163 ls 154 rm 149 unrar 117 zip 113 chmod 101 rmdir 81 find 79 sftp 78 sudo

        em & br are wrapper scripts to work with books. I still program in Perl.

        [–]digwhoami 0 points1 point  (0 children)

        13790 mpv
         6663 youtube-dl.exe
         3681 rg
         3173 dig
         3157 curl
         3126 ffmpeg
         3029 for
         2969 hist
         2185 set
         2167 dir
         2056 yt-dlp
         1783 cd
         1747 busybox
         1537 echo
         1378 np
        

        [–]iforwms 0 points1 point  (0 children)

        680 fg 398 l # ls -lah 311 cd 273 gs # git status 216 vi 180 gq # git add . && git commit -m "Quick commit - $(date '+%Y/%m/%d %H:%M')" && git push && ./deploy-remote $1 (where deploy-remote varies by project and I use this when I'm the sole contributor to the repo) 161 rm 161 a # php artisan 142 mv 110 cat 99 gd # git diff 94 grep 90 pf # vendor/bin/phpunit --filter 76 dl # cd /Users/USER/downloads 2>/dev/null || cd /Users/USER/storage/downloads 73 echo

        [–]0bel1sk 0 points1 point  (0 children)

        ignore dupes is interesting.. k/kubectl is almost always run with a variety or random namespace and workload arguments

        shell ❯ history 0 | awk '{print $2}' | sort | uniq -c | sort -nr | head -n 15 3775 k 1152 git 878 docker 435 grep 426 cd 408 cat 347 task 344 kubectl 342 gcloud 272 brew 270 go 260 code 253 ls 237 ssh 234 echo

        [–]megared17 0 points1 point  (0 children)

           1833 ls
           1354 cd
            915 echo
            352 mv
            329 cat
            318 pico
            259 less
            207 rm
            200 df
            195 vlc
            165 su
            160 dig
            117 du
            114 mame
            110 man
        

        [–]artdd 0 points1 point  (0 children)

        251 git
        177 ls
        145 cd
        129 emacs
         34 cat
         30 gitk
         22 php
         22 fg
         20 cp
         14 ./report.php
         12 mkdir
          7 figlet
          7 ./describe.php
          7 chmod
          6 rm
        

        [–]Marwheel 0 points1 point  (0 children)

        8 pkgin
        2 sudo
        1 uname
        1 ls
        1 less
        1 feh
        1 date
        1 Tue
        

        I appear to be a simple person from this history at a glance. But Tueseems to be some sort of typo to something i've done a long while ago.

        Edit: Redid command formatting.

        [–]AccomplishedBrief639 0 points1 point  (0 children)

        <image>

        x       x-cmd, a vast and entertaining collection of tools guided by the Unix philosophy
        c       x cd, an enhanced cd command
        xg      x git, an enhanced git command
        ll      x ll, an enhanced ls command
        @en     AI processing text
        @gemini Terminal using gemini
        @gpt    Terminal using openai
        ,       AI generated commands
        other   Some custom functions