cat .bash_history | awk '{print $1}' | grep -v "#" | sort | uniq -c | sort -nr | awk '{print $2}' |head -n20
Post your most commonly used commands. If you use any shells other than bash, replace cat .bash_history with whatever your shell provides.
also, useful shell scripts and oneliner general.
what are your most commonly used shell commands?
Falling into your wing while paragliding is called 'gift wrapping' and turns you into a dirt torpedo pic.twitter.com/oQFKsVISkI
— Mental Videos (@MentalVids) March 15, 2023
sudo !!
Probably docker compose and git
There's literally a one-liner in the OP that will display your most used commands...
its not accurate because most of my commands are utilized in scripts so the OP result is just
bash (me launching the scripts with commands in them)
cd
ls
mpv
etc
>compositor
>bash
>vim
>./build/src/picom
>ninja
>night
>cd
>python
>standby
>sudo
>python3
>make
>htop
>echo
>./Downloads/lmms-1.3.0-alpha.1.102+g89fc6c9-linux-x86_64.AppImage
>./xmenu.sh
>wal
>mspd
>pkill
>cat
i only watch youtube and get mad on LULZ
sed, awk, cut, curl, grep
you can pretty much do anything you need with coreutils but it might not be fast depending on how much data you deal with.
i had a script that was looping through a million line file and it was taking hours to do it, but i rewrote the logic in a way that took 5 minutes instead.
cd..
https://github.com/cfenollosa/bashblog
code
that's all the shell is good for
oh and sometimes
rm -rf temp
cd
ls
git
code
dotnet
a.out
echo
docker
clear
cc
terraform
gcc
cat
npm
touch
vim
curl
sudo
aws
cd
echo
curl
ls
git
cat
vi
crontab
date
touch
mkdir
go
exit
brew
ssh
nordvpn
node
./get-holders-and-supply.sh
~/Development/tools/get-holders-and-supply.sh
rm
>./get-holders-and-supply.sh
what does this do
tracks stats for ethereum tokens. originally for tracking whacked.
that's actually zsh above. I don't use bash.
bash is:
exit
source
nix
ls
pwd
pip
npm
node
>vi
>gss
>poetry
>alembic
>ga
>rm
>uvicorn
>ipython
>cz
>gdca
>c
>.
>pre-commit
>python
>sudo
>gd
>pp
>cd
>tree
>yadm
AH SWEET A DATA-MINING THREAD
9868 cl # cd ... && l
7322 rm
5011 pushd
4215 v # vim
3949 mv
3575 cd
3317 find
3316 bat
3297 grep
2942 play # mpv --speed=1.25
2730 nsxiv
2658 man
2622 paru
2460 l # ls -N --color=auto --group-directories-first
2340 cat
2168 mpv
2127 pm #pacman
2066 echo
1862 sed
1795 audacity
this command I found is more efficient by relying a lot on awk
awk '{a[$1]++}END{for(i in a){print a[i] " " i}}' "$HISTFILE" | sort -nr | head -n ${1:-10}
holy shit how long is your history
wc -l ~/.local/state/history
136188 ~/.local/state/history
beautiful. i should raise my 500 limit.
add these to your shell's rc file
export HISTCONTROL='ignoreboth:erasedups'
export HISTFILE="$XDG_STATE_HOME/history"
export HISTFILESIZE= HISTSIZE=
My histfile is over 4MB, I should go delete some of the typos and junk.
kind weird
npm
clear
tsc
node
ts-node
ls
rm
cd
time
mv
typings
open
_storage
ffmpeg
_storage2
_db
which
code
killall
iina
export PATH="$PATH:[yt-dlp folder]"
yt-dlp --config-location AutoDownloadTempVideoList.txt
ffmpeg -i [retard created].gif [filename].webm
> ~./bash_history
Literally doesn't exist on MacOS.
According to
https://apple.stackexchange.com/questions/87888/how-do-i-edit-bash-shell-terminal-history
it used to.
Yes, I'm planning on upgrading to linux due to the recent disrespect I've gotten from crApple (scanning my files, making crippled versions of what was good software, much more...). All this is due, likely in no small part, to the shitskins (indians) they have increasingly employed.
can't make this shit up
$ cat .bash_history | awk '{print $1}' | grep -v "#" | sort | uniq -c | sort -nr | awk '{print $2}' |head -n20
perl
man
dl
vim
crepl
dlw
4update
findg
./make.pl
gcc
swipl
tpb
desu
grep
time
type
./make_mod.pl
mpv
sudo
4save
>4update
>4save
>desu
what kind of funky chan scripts have you made here, anon
also these, tell us your secrets
>crepl
>dlw
dl, yt-dlp wrapper, dlw, same for playlist
4update, manually lanch the web scrapper to fetch the active threads I'm scraping (not all of
them)
4save, copy finished threads on external HD to make room
tbh download thread from tbharchive
tpb, pirate bay
crepl, script to execute C code as if it were interpreted, it makes a temporary files, compiles it and executed. this is maybe the best script idea I've ever had, I learned loads of C like that, very handy to test new library functions
$ crepl -Mfcntl,errno,string 'void print_errno() { printf("errno %d: %sn", errno, strerror(errno)); } print_errno(); open(argv[1], O_RDONLY); print_errno(); ' fsfsfsdf
errno 0: Success
errno 2: No such file or directory