This is an alias set designed for Linux/MACOs users,ASDF. Sh(Https://github.com/shenjia/asdf.sh) designed for QWERTY keyboard users,Aoeu. ShHttps://github.com/shenjia/aoeu.sh is designed for Dvorak keyboard users.
As developers, we need to repeat a lot of repetitive commands on the terminal every day. Some large repeated commands (such as deployment, installation, and backup) can be written into shell scripts to avoid repeated typing, but many frequently used commands are ignored.
Some commands are short, suchVimAndCD ..But we have to repeat it countless times every day. And some are not short, suchApt-cache searchOrPS aux | grep.
Maybe you think these commands are very short, but when the time is urgent (such as fixing bugs on the production server), it is really the best thing to drop a few characters.
Set 1 ~ The two-character alias can save a lot of time and reduce the fatigue of our fingers.
Dealing with Directories
alias c='cd' // change directoryalias a='cd ..' // leave directoryalias s='ls' // listalias ss='ls | grep' // list with filteralias d='pwd' // show current locationalias m='mkdir' // make directoryalias r='rm -r' // delete directory ( or files )
Dealing with files
alias e='vim' // edit a filealias f='find -name' // find file by namealias t='tail -f' // keep watching at a filealias x='tar zxvf' // extract compress file
Dealing with packages
alias sh="apt-cache search" // search a packagealias in='apt-get install' // install a packagealias un='apt-get remove' // uninstall a package
For MacOS, use "port search | Port install | Port Uninstall" instead.
For centos, use "yum search | Yum install | Yum remove" instead.
Dealing with System
alias q='exit' // exit shellalias p='ps aux | grep' // look for processalias h='e /etc/hosts' // edit host config
Dealing with ASDF. Sh
alias eee="e /usr/local/bin/asdf.sh" // edit the asdf.shalias xxx=". /usr/local/bin/asdf.sh" // execute the asdf.sh
Make your own ASDF. Sh!
You can create an alias for your most commonly used commands to further improve your work efficiency. Don't forget to try to use it in shell first.
For example, I set these alias to facilitate my development work:
alias nr='service nginx restart'alias phpr='service php5-fpm restart'alias phpi='e /etc/php5/fpm/php.ini'alias sn='svn st | grep ? | awk '\''{print $2}'\' alias sa='svn add `svn st | grep ? | awk '\''{print $2}'\''`' alias sr='svn rm --force' .....