Linux Learning Notes (24)

Source: Internet
Author: User

One, pipe and operation control

Pipe break: The result of the preceding output is given to the following command

Example: Find/*.txt | WC-L displays the number of files in the current file that end with the. txt.


Job Control

CTRL + Z pauses the current

Jobs dropped behind the scenes to list

FG backend commands revert to foreground

BG Front desk command dropped backstage.

& Add & After command, and drop the command directly into the background


Second, shell variables

System variables are usually capitalized letters of English

EVN to view commonly used system variables

The SET command has many variables, including user-defined variables

unset removing variables

Variable name rules: Letters, numbers, underscores, the first cannot be numbers, and special symbols need to be enclosed in single quotes.

echo &ssh_tty See yourself connecting that TTY


Export global variable (the downward relationship, his child shell will take effect, but the parent shell will not.) )


Third, the environment variable configuration file

1, when you login directly in the machine login interface, using SSH login or su switch user login,. bash_profile will be called to initialize the shell environment

2, when you do not log in to the system and use SSH directly at the remote Execution command,. BASHRC will be called
3. When you have logged into the system, each time you open a new terminal, the. BASHRC will be called again.

. bash_logout commands to be made when the user exits


PS1 is defined under/ETC/BASHRC, specifying a paragraph before the command line, which can be specified in the format.


Linux Learning Notes (24)

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.