Aoeu. sh/ASDF. Sh makes your type less, do more

Source: Internet
Author: User

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'                                     .....                          

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.