What are your most commonly used terminal commands?

What are your most commonly used terminal commands?

#!/usr/bin/env bash

TOTAL=$(cat ~/.bash_history | wc -l)
LIST=$(cat ~/.bash_history | sed 's/sudo //g' | cut -d ' ' -f1 | sort | uniq -c | sort -nr | head -20)
echo "Most common out of $TOTAL commands:"
n=0
for line in $LIST
do
if (( (n % 2) == 0 ))
then
PCT=$(echo "scale=3; ($line / $TOTAL) * 100" | bc | sed 's/00$//g')
echo -ne "${PCT}%\t${line}x"
else
echo -e "\t$line"
fi
n=$((n + 1))
done

Last time I did this thread, half the participants had screenfetch in the top 10.

Cool script user
[shinu@claymore haha]$ sh as
Most common out of 500 commands:
17.8% 89x ./black_white
7.0% 35x sensors
6.4% 32x date
6.2% 31x ./vidlearn
6.0% 30x python
4.2% 21x wget
3.8% 19x nc
3.8% 19x cd
3.2% 16x notify-send
3.2% 16x ffmpeg
3.0% 15x fdisk
2.0% 10x nasm
2.0% 10x nano
1.8% 9x clear
1.4% 7x ./cpucurgov
1.2% 6x sync
1.2% 6x su
1.2% 6x man
1.2% 6x fg
1.2% 6x ./water_reminder
[shinu@claymore haha]$

77.8% 389x clear;
3.4% 17x cd
2.4% 12x youtube-dl
2.0% 10x java
1.8% 9x rm
1.8% 9x ls
1.4% 7x mv
1.4% 7x ./offzip
.8% 4x cp
.8% 4x clear
.6% 3x make
.6% 3x ./pdfcrack
.6% 3x ./config
.4% 2x python
.4% 2x mono
.4% 2x gcc
.4% 2x cat
.4% 2x brew
.4% 2x ./guapdf
.2% 1x uptime

17.1% 343x nano
14.6% 293x ls
12.0% 240x make
6.9% 138x clear
6.4% 129x ./graphics
4.1% 83x cd
3.2% 64x date
2.6% 52x man
2.6% 52x for
2.3% 46x wget
2.1% 42x rm
2.0% 40x ./dubs
1.8% 36x echo
1.6% 33x apt-get
1.3% 27x sshfs
1.2% 24x cat
1.1% 22x ssh
1.1% 22x gcc
.9% 19x scp
.9% 19x mpv

Your script gave me some syntax errors and some incorrect output at the bottom (I tried out pipes.sh for like five minutes once) but everything else looks realistic. Bash 4.4.7.
./popcon.sh
Most common out of 2000 commands:
13.3% 267x vim
9.6% 193x fg
5.7% 114x cd
5.4% 109x ls
5.0% 101x echo
4.2% 84x tmux
3.6% 73x gcc
2.5% 51x apt
2.2% 45x 36
(standard_in) 1: syntax error
(standard_in) 1: syntax error
% pipes.shx 33
0% catx 29
0% sshx 28

>nasm
Fuck off grandpa

Most common out of 747 commands:
18.0% 135x java
14.4% 108x javac
11.5% 86x apt
6.4% 48x cd
5.7% 43x python3
4.0% 30x ls
3.2% 24x nano
2.5% 19x rm
1.7% 13x nmap
1.7% 13x apt-get
1.6% 12x chmod
1.2% 9x thunar
1.2% 9x nasm
1.0% 8x ssh
1.0% 8x mkdir
.9% 7x youtube-dl
.9% 7x stat
.8% 6x ufw
.8% 6x nc
.6% 5x qemu-system-x86_64

I modified it to work with zsh. Will post if anyone is interested.

~ % ./common_commands.sh
Most common out of 10253 commands:
9.7% 999x git
6.6% 680x gcm
5.5% 574x vim
5.3% 551x cd
4.1% 430x rm
3.3% 348x yaourt
2.8% 289x ls
2.8% 288x pacman
2.3% 236x man
2.2% 232x echo
1.8% 193x openssl
1.7% 179x cat
1.6% 169x touch
1.6% 169x mv
1.6% 167x python
1.6% 167x npm
1.4% 145x yarn
1.3% 142x pip
1.3% 141x mkdir
1.2% 128x docker

Why do you use a non-standard shell user?

Please post, its giving me an error when trying with my histfile

>clear
ctrl + L works as well and is faster.

seconding request that you post zsh version, I'd like to check when I get back to computer

>compiling java from terminal
what's wrong with you?

What's gcm?
>mfw thinking about the number of oh-my-zsh aliases I use for git - ga, gc, gl, gp, glol, gpsup, grhh, etc

>mfw just discovered this
Holy shit thanks user

your script fucked something up
Most common out of 500 commands:
22.0% 110 x pkill
8.4% 42 x ls
6.4% 32 x cd
5.8% 29 x nano
5.6% 28 x 27
0% scrot x 24
0% ffmpeg x 22
0% mpv x 18
0% python3 x 12
0% find x 10
0% id x 10
0% clear x 9
0% wget x 8
0% date x 6
0% xset x 6
0% top x 6
0% ps x 6
0% gimp x 6
0% df x 5
0% mv x

$ awk '{print $1}' .bash_history | sort | uniq -c | sort -rn | head
139 ls
83 cd
43 pacman
37 rm
28 exit
26 find
19 su
15 mpv
14 cat
11 startx

> startx
Arch user detected.

The script seems to have fucked itself. I also modified it slightly to work with zsh. zsh doesn't log duplicate entries, so this list is not 100% accurate.
Most common out of 2650 commands:
11.4% 304x emerge
10.1% 270x vim
7.9% 210x exit
3.6% 98x ls
3.2% 86x xrandr
2.9% 79x cat
2.7% 74x mocp
2.6% 69x tmux
2.6% 69x htop
2.6% 69x clear
2.4% 65x equery
2.1% 57x pgrep
1.5% 40x flaggie
1.5% 40x 32
0% servicex 31
0% cdx 30
0% screenfetchx 29
0% sshx 29
0% pkillx 26
0% rmx

awk '{print $1}' .bash_history | sort | uniq -c | sort -rn | head
15 sudo
14 cd
9 ls
6 l
4 nano
3 zsh
2 pwd
2 mkdir
2 cp
1 xscreensaver-demo

it's nice to track how much it took to install zsh after a fresh install

> equery
Try q one of these days.

>.bash_history
Fuck bash nigger.
Changed it to .zsh_history.

[reisen@arch ~]$ ./asdf.sh
Most common out of 155576 commands:
23.2% 36227x make
4.1% 6396x git
4.0% 6352x ncmpcpp
3.6% 5707x cargo
3.3% 5227x ./a.out
3.1% 4873x cat
2.7% 4256x clear
2.5% 3994x vim
2.3% 3690x ./vm/vm
2.3% 3645x bklg
2.2% 3496x ls
2.0% 3258x sync
2.0% 3177x man
1.8% 2955x curl
1.8% 2919x time
1.5% 2479x ./vasm/vasm
1.4% 2327x cd
1.4% 2326x ssh
1.4% 2251x g++
1.0% 1711x pacman
[reisen@arch ~]$


Man, I sure have typed make a lot.

qoson
rename
process_media
history
curl
terminal-notifier
qosoff
gsleep

Most common out of 135746 commands:
11.9% 16154x ls
5.7% 7806x vim
3.8% 5291x mplayer
3.6% 4957x cd
3.2% 4465x git
2.7% 3709x rm
1.9% 2591x apt
1.8% 2554x mv
1.8% 2549x apt-cache
1.8% 2525x man
1.8% 2452x cat
1.6% 2174x mpv
1.5% 2128x ssh
1.3% 1832x dpkg
1.1% 1524x echo
1.0% 1372x sag
.9% 1330x ncmpcpp
.9% 1281x mpadd
.9% 1244x grep
.9% 1222x unrar

thats what happens when you dont have a package manager and your x breaks daily

>sync
What are you working on that you need to call that so often?

pinninhg.
will post when i return to my main terminal.

does this work with tcsh?

Nothing, it's just an autistic habit of mine ever since a storm ages ago.
I even have a keyboard shortcut to run sync.

>when you dont have a package manager
>1.0% 1711x pacman

>and your x breaks daily
Or maybe I just write programs? I've never had X break on me.

zsh is for losers haha. come on, son

Slightly modified to run on zsh. Not on my main computer, though.

1 474 12.1632% vim
2 422 10.8288% cd
3 205 5.26046% git
4 197 5.05517% ssh
6 189 4.84988% gss
7 162 4.15704% ls
8 144 3.69515% ansible-playbook
9 112 2.87401% python3
10 108 2.77136% ggpush
11 90 2.30947% gca
12 85 2.18116% vact
13 70 1.79625% pip
14 64 1.64229% exit
15 58 1.48832% ..
16 55 1.41134% rm
17 52 1.33436% docker
18 50 1.28304% pip3
19 43 1.10341% jupyter
20 42 1.07775% vagrant
21 42 1.07775% ansible-vault
22 39 1.00077% curl
23 31 0.795484% grep
24 28 0.718501% umake
25 28 0.718501% man

sync writes all the shit that's in the cache waiting to be written to the drive, it good practice to execute sync every time you copy large (number of or size) files to your harddrive, or before umounting your thumb drive etc

Most common out of 2000 commands:
12.2% 245x ls
5.1% 102x exit
5.0% 100x apt-get
4.7% 95x vi
4.1% 82x cat
3.5% 70x mount
3.3% 67x mail
2.7% 54x ps
2.2% 44x htop
2.1% 42x service
2.1% 42x chmod
1.9% 39x cd
1.8% 37x ./ratelimit.sh
1.8% 36x su
1.7% 34x youtube-dl
1.6% 33x ./sshpi.sh
1.6% 32x epiphany
1.5% 30x nano
1.5% 30x crontab
1.4% 29x rm

>implying bash is standard

Only in some shells.

23.6% 473x ls
11.8% 237x cd
10.4% 208x clear
9.6% 193x nano
7.3% 146x make
2.7% 55x ng
2.7% 55x apt-get
2.0% 40x npm
1.4% 29x mysql
1.4% 28x rm
1.1% 23x cat
1.0% 21x mv

cat: /Users/daniel/.bash_history: No such file or directory
cat: /Users/daniel/.bash_history: No such file or directory
Most common out of 0 commands:


i seriously hope you dont use bash

sh: bash: not found
shit thread

8.9% 97x vim
7.7% 84x ls
6.7% 73x cd
6.3% 69x rm
3.1% 34x pkg
3.0% 33x df
2.8% 31x ping
2.8% 31x man
2.6% 29x gmake&>error.txt
2.5% 28x tmux
2.3% 26x xfce4-panel
2.3% 26x startx
2.1% 23x neofetch
1.9% 21x killall
1.7% 19x wpa_supplicant
1.7% 19x kldload
1.6% 18x ./.fehbg
1.5% 17x mc
1.4% 16x gcc
1.4% 16x acpiconf

fucked it up so for some reason / is in there, but the rest seems accurate
Most common out of 10664 commands:
8.6% 927x make
6.8% 731x vim
6.7% 716x man
6.3% 679x cd
4.0% 429x ls
3.6% 384x rm
2.8% 306x vlc
2.6% 283x \
2.1% 227x mv
1.9% 212x ./mdriver
1.8% 200x echo
1.7% 190x for
1.7% 187x cat
1.6% 171x gcc
1.5% 167x cp
1.0% 107x mkdir
.9% 105x svn
.9% 101x ./bla.py
.8% 91x ssh
.8% 89x ./all.sh

>svn
how suicidal are you user

we use it at school to hand in assignments

Most common out of 1000 commands:
14.2% 142x cd
10.3% 103x ls
7.2% 72x wget
6.9% 69x echo
5.3% 53x zypper
4.1% 41x ll
3.1% 31x cat
2.9% 29x 4dl
2.8% 28x rm
2.5% 25x mkdir
2.3% 23x vim
2.3% 23x less
2.1% 21x exit
1.6% 16x man
1.5% 15x mv
1.3% 13x source
1.0% 10x find
.9% 9x jq
.9% 9x fg
.8% 8x ssh

dev/scripts ./shell-totals.sh
cat: /home/henry/.bash_history: No such file or directory
cat: /home/henry/.bash_history: No such file or directory
Most common out of 0 commands:

Most common out of 504 commands:
28.9% 146x tmux 11.3% 57x ls
10.9% 55x cd 7.1% 36x vim
6.7% 34x cp 4.1% 21x cat
2.3% 12x mysql 2.1% 11x net
1.7% 9x w 1.5% 8x mc
1.3% 7x rm 1.1% 6x youtube-dl
1.1% 6x mv 1.1% 6x chmod
.9% 5x ps .9% 5x less
.9% 5x apt .7% 4x wget
.7% 4x w3m .7% 4x tail

>Using bash
Retarded.

```
12.6% 63x ls
12.2% 61x gcc
7.2% 36x vim
5.4% 27x clear
4.6% 23x cd
4.4% 22x nano
```

Fuck, markdown broke.

Ipconfig /flushdns
And
Netsh int ipv4 reset reset.log

"pacman" didn't tip you off?

Bash is the de facto standard
Gtfo with your special snowflake shit

hmm
Most common out of 2000 commands:
9.9% 198x git
9.2% 185x ls
8.6% 172x cd
8.5% 170x c
6.1% 123x vim
5.1% 103x man
4.1% 82x ./freader.py
3.3% 67x apt-get
3.1% 63x uda
2.5% 51x exit
2.4% 49x cat
2.3% 47x clear
1.7% 35x -s
1.7% 34x rm
1.7% 34x apt-cache
1.6% 32x ssh
1.2% 25x poweroff
1.0% 20x ping
1.0% 20x journalctl
.9% 19x l

No.

1 1134 8.70032% git
2 1083 8.30904% l
3 1024 7.85638% ant
4 961 7.37302% cd
5 839 6.43701% make
6 826 6.33727% _
7 610 4.68007% ip
8 577 4.42688% sp
9 464 3.55992% grep
10 304 2.33236% rm
11 257 1.97177% man
12 235 1.80298% vs
13 222 1.70324% cat
14 180 1.381% sudo
15 169 1.29661% mv
16 159 1.21989% mupdf
17 155 1.1892% mutt
18 151 1.15851% gcc
19 131 1.00506% echo
20 130 0.997391% less
There must be a problem, I can't have run ant more than make.
Also, sp and vs are actually scripts that open the given filename in neovim.

>having history enabled
$ ./shit
Most common out of 0 commands:

>not using ctrl-r to autocomplete commands

9.7% 997x cd
7.4% 763x cat
5.4% 561x open
4.1% 423x rm
4.1% 419x touch
3.5% 367x python
2.8% 289x brew
2.7% 285x mkdir
2.6% 274x 262
0% echox 234
0% pipx 228
0% mvx 198
0% ffmpegx 192
0% gitx 178
0% youtube-dlx 176
0% lsx 151
0% pingx 137
0% sayx 135
0% cpx 134
0% zbarimgx

So far you seem like the most my nigga in the thread

>nano
Do yourself a favor and use a better text editor

Most common out of 50 commands:
14.0% 7x ls
10.0% 5x feh
8.0% 4x rm
6.0% 3x cd
6.0% 3x cbg
4.0% 2x tar
4.0% 2x pwd
4.0% 2x mv
4.0% 2x kill
4.0% 2x jobs
4.0% 2x ./hist.sh
4.0% 2x clock
2.0% 1x youtube-dl
2.0% 1x vim
2.0% 1x touch
2.0% 1x scrot
2.0% 1x r5
2.0% 1x ps
2.0% 1x md5sum
2.0% 1x lynx

My HISTSIZE is set to 50 and gets scrubbed on boot.

>x200 nano

please stop