A small byte of bash aliases and functions.
Nilkun
Posted on January 12, 2021
I'd like to share a few of my favorite bash aliases and functions. All I ask for in return is for you to share your own in the comments!
# Set up ls to use my preferences
alias ls='ls -l --color=auto --group-directories-first'
# Quickly add things to a todo-list. Usage: remember milk
alias remember="xargs -I TODO echo \"[ ] TODO\" >> ~/remember <<<"
# I often find files that I don't know what to do with, but I don't want to delete. So I just move them to dev-hell. usage: devhell mysuperniftyfunctionthatiwillneveruse.js
alias devhell='mv -t ~/dev-hell/'
# I don't know how many times I typed this in before I made it an alias. Usage: pid vim
alias pid="ps -aux | grep "
# I use the following function and alias to jump back and forth between home and the current directory.
function home() {
PREVIOUS=$(pwd)
cd ~
}
alias back="cd $PREVIOUS"
# I use Arch Linux, and often download from AUR. Usage: aur chromium
alias aur="xargs -I FILENAME git clone https://aur.archlinux.org/FILENAME <<<"
💖 💪 🙅 🚩
Nilkun
Posted on January 12, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.