DEV Community

Discussion on: What are your preferred bash aliases?

Collapse
 
josephj11 profile image
Joe

Here are a few of mine:

Make log times human readable

alias dmesg='dmesg -T'

Remove editor backup files

alias rmtl='rm -f *~'

And a couple of functions (in ~/.bashrc)

Change to my ~/bin directory

bin() {
cd $HOME/bin
echo -en "\t\t"
pwd
}

Quick calculation

## Command line calculator
calc() {
    bc -l <<< "$@"
}

I have several aliases that just cd to directories I use a lot.

I have a simple activity log program I wrote in bash that writes to a text file. It has eleven aliases to invoke its features and to create entries for my most common activities that I can just tack details on the end of.