pv (Pipe Viewer) is a command line tool to view verbose information about data streamed/piped through it. The data can be of any source like files, block devices, network streams etc. It shows the amount of data passed through, time running, progress bar, percentage and the estimated completion time.
sudo !!
to rerun last command as sudo.history
can be paired with!5
to run the fifth command listed in history.Fifth as in fifth most recent command or fifth oldest?
ls
Getting cheatsheets via
curl cheat.sh/INSERT_COMMAND_HERE
No install necessary, Also, you can quickly search within the cheatsheets via
~
. For example if you copycurl cheat.sh/ls~find
will show all the examples ofls
that usefind
. If you remove~find
, then it shows all examples ofls
.I have a function in my bash alias for it (also piped into
more
for readability):function cht() { curl cheat.sh/"$1"?style=igor|more }
less
,watch
jq
Not a specific command, but I learned recently you can just dump any executable script into ~/bin and run it from the terminal.
I suffer greatly from analysis paralysis, I have a very hard time making decisions especially if there’s many options. So I wrote a script that reads a text file full of tasks and just picks one. It took me like ten minutes to write and now I spend far more time doing stuff instead of doing nothing and feeling badly that I can’t decide what to do.
This is because
$HOME/bin
is in your$PATH
environment variable. You can add more paths that you’d like to execute scripts from, like a personal git repo that contains your scripts.
sudo pacman -Syu
I just aliased “sudo pacman -Syu && yay -Syu --aur” to “update” cause I got tired of writing it every day.
clear
. Constantly, and for no reason.I like it so much I alised it to
c
.Ctrl-L
CMD/CTRL-K for me.
Oh. I know. But you don’t understand - I’m compelled to type it out. I must.
I used to, but the terminal clear is better, so I don’t.
Alt + F4
compgen -back
to see all valid things you can type into a shell.Since nobody has said yet, I use screen pretty heavily. Want to run a long running task, starting it from your phone? Run screen to create a detachable session then the long running command. You can then safely close out of your terminal or detach with ctrl a, d and continue in your terminal doing something else. screen -r to get back to it.
I Always forget to run screen first, so I just rely heavily on dtach
I would know this as tmux, is there a difference?
gnu screen is just a different program than tmux. they do the same thing though
Also, screen can connect to an UART device or serial or anything that offers up a TTY
sudo udevadm monitor
Figuring out which usb device went on holiday.
Wow, super useful command. Starring this comment
Ctrl-r with https://github.com/atuinsh/atuin is amazing. Never forget a command you used ever again.
I trigger it with the up arrow.
Neofetch
Get on with the times, install fastfetch ;)