Alias are a great tool to help increment your productivity on the terminal with bash (or any shell program you’re using), but usually we are too lazy to think at what are the most common, or long commands that we use frequently and prepare an
alias for them.
And so someone has done a small piece of software to do this job: aliaser
Aliaser helps you identify frequently typed commands and creates bash aliases for them. Aliaser analyses your bash history and helps you identify commands that you use frequently.
This small gem it’s a python program, distributed as a a.tar.gz archive.
So download aliaser0.1, untar it and run as root the install script:
cd /tmp/ wget http://aliaser.googlecode.com/files/aliaser0.1.tar.gz tar zxvf aliaser0.1.tar.gz cd aliaser sudo ./install
This will print the following message
installing ... basic installation done. Please follow these steps carefully to complete installation. run the following command mkdir ~/.aliaser; touch ~/.aliaser/aliases.sh add the following commands to your .bashrc . source ~/.aliaser/aliases.sh /usr/bin/aliaser /usr/bin/aliaser show-tips
So follow these instructions and do:
cd mkdir ~/.aliaser touch ~/.aliaser/aliases.sh echo "source ~/.aliaser/aliases.sh /usr/bin/aliaser /usr/bin/aliaser show-tips" >> .bashrc
Please note: This program will work only with bash, it uses specific bash files, so you cannot use it with zsh or other shells.
On your next login you’ll see something like that:
[ 0] 037 times aptitude search [ 1] 030 times aptitude install [ 2] 012 times sudo apt-get [ 3] 010 times /etc/init.d/dnsmasq Choice (empty to ignore all, CTRL+C to cancel): 0
For the moment just hit retun to ignore this.
The most useful options for starting with
aliaser Analyses bash history and prompts you to create aliases for most frequent commands.
aliaser delete ' Delete an existing alias eg:
aliaser delete ssh43
For more options just type:
aliaser -h, happy aliasing.
- Linux Security: How to hide processes from other users
- Productivity boosting with open source applications
- 8 Simple To Follow Tips To Secure Your Apache Web Server
- The Humble “Open Source” Bundle
- Linux Games: FTL Advanced Edition expansion
Find me on Google+