Accumulation of small knowledge points used in Linux systems

Source: Internet
Author: User

Preface: Do something under Ubuntu and execute some commands under the terminal. Or do some work in vim. Naturally need to use some small knowledge points, not how to look at the "bird Brother's dishes", basically encountered what the problem to achieve what function, find a blog, learn the knowledge points, some scattered. Then a little accumulation of summary.


1. Batch-processing command SH:

When the terminal executes multiple commands, those commands are written to a file face, and named Xx.sh, the terminal executes SH xx.sh can break, the terminal will be a command to execute the xx.sh file in the face.

2.echo:

In the batch command. You need to use the command to output some of the things you want to the terminal. Echo is broken, like a python print. The echo "================" in the terminal is like a Python bid to write down the execution of the program and add the sentence print 30* "*".

3. Pipeline redirection >,>>:

> is the output to the specified file, such as the existence of the file will also be written again, the original content of the file will not be preserved.

>> is to append the output to the file, the original content of the file will be preserved.
$ ls >> log.txt or $ ls > log.txt
In addition, there are script,tee and other orders, spare time to look at the system to write down.

4.grep,awk,sed:


5. Tmux command:

It is often found at remote to a machine or under a local terminal. A terminal is far from enough to use, often need to open a few at the same time, often also want these forms at the same time displayed in line of sight.

Tmux was born for such a demand.

Tmux all commands by default need to first press CTRL + B, and then type the appropriate command

Ctrl+b "-Split pane horizontally
Ctrl+b%-Divides the current pane vertically
Ctrl+b arrow keys-Toggle between panes
Ctrl+b. And don't loosen the ctrl. Arrow Keys-Resize panes
Ctrl+b C-(c) reate generate a new form
Ctrl+b N-(N) Ext moves to the next form
Ctrl+b P-(p) revious moves to the previous form.
Ctrl+b space Bar-using the next built-in layout
Ctrl+b Q-Displays the number of the delimited form
Ctrl+b O-Jumps to the next delimited form
Ctrl+b &-Exit Tmux after confirmation


Documentation: http://blog.csdn.net/jianbinhe1012/article/details/7741727

6. To be continued.

。。




Accumulation of small knowledge points used in Linux systems

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.