Bash Configuration and application

Source: Internet
Author: User
Tags locale
. INPUTRC

The automatic completion of bash can be set up like this:. INPUTRC add two lines:

Set completion-ignore-case on
set completion-map-case on

Then, when the tab matches, ignore the case, ignore the horizontal bar, underline. History

Expand the size of your own history and set the method as follows:

$ echo "Histcontrol=ignoreboth" >>~/.BASHRC
module annotation for Vim/vim

Http://stackoverflow.com/questions/947897/block-comments-in-a-shell-script
Vi/vim annotation A large section of content is too good ... Bash Common pits

the http://mywiki.wooledge.org/BashPitfalls sort learning default is to use $tmpdir or/tmp,-t
Specifies an additional temporary data directory. Especially when you have a lot of data for sort processing, you specify a temporary directory with enough space. Default Tmpdir or/TMP may not have enough space to complete sort-g This parameter is excellent and can handle floating-point numbers.

(Atnodes-l ' W|head-n 1 ' l-crwl[1-7,9-15]) | Sort-k12-gr
#个人解释如下:
# w machine load Information
# head-n 1 The first line
# machine name
# sort-k12-gr in the 12th field (the default separator is a space) for the reverse order of floating-point numbers

Can list the machines with the highest load in the cluster
There are a lot of sorts of parameters:-h-m-n-r-N used, the rest is useless, still need to explore-h parameter useful, can put other commands-H (Human readable number) format of the number of the correct sort. But it looks like sort 8.x later. The sort version of CentOS is too low and generally does not have this parameter. GNU coreutils can be downloaded and compiled by itself. The string order of sort is closely related to the locale. If the runtime locale differently, the results of the sort will be different from those of Java, Perl, and Python. Other SSH configurations

Http://blog.tjll.net/ssh-kung-fu/ssh-copy-id deploys its own public key to the server for which you want to log on without a password. Be a tunnel, be a socks agent SSHFS the directory of the remote server mount to the local directory other useful things

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.