Have you ever encountered such a situation: from the remote Linux environment of the software, you have compressed a large pile of files into a .tar.gz file, which has not been completed for half an hour in a row. Then, suddenly you are disconnected
Struct point {int X, Y; point () {} Point (int xx, int YY) {x = xx; y = YY;} point operator-(point const & B) const {return point (x-b.x, y-b.y);} int friend operator * (point a, point B) {return f_abs (. x * B. y-a.y * B. x) ;}int len2 () {return x
Option-Y: The operation is performed without user confirmation.
Yum-y install : Install the specified software.
Yum-y update: Upgrade the software.
Yum-y update : update a specific file
Yum check-Update: checks whether software needs
1. Difference between single quotes and double quotes
Single quotation marks: A single quotation mark can only contain general characters without special characters. Double quotation marks include special characters.
Example:
# Name = vbird
#
Parentheses are used to run a group of commands,
The command enclosed by () indicates to run in the sub-shell without affecting the current shell environment.The command enclosed by {} indicates that the command is run in the current shell, and
Reprinted: http://langzhe.iteye.com/blog/671762
Prerequisites: the Erl file must be compiled using the debug_info option. Otherwise, the invalid beam file or no abstract code will appear:Error
Compilation Method: Make: All ([debug_info]). |C
FTP server 172.17.17.17
Account yangsh
Password 7183458
1. fixed form
#! /Bin/shEcho "this is my first FTP auto script"Echo "Open 172.17.17.17 21User yangsh 7183458PWDPut ftp.txtCloseBye "| FTP-I-in
2. parameter transfer
#! /Bin/sh
The format is as follows:
# Echo-e '\ 033 [background color; foreground color; action control M string \ 033 [# m'# Echo-e '\ e [background color; foreground color; action control M string \ e [# m'
# Foreground | Background: Color#----------------
1. First look at a common command
PS-EDF | sort | uniq | grep-V sh | more
This command combines several different shell commands, which have this feature. Uniformity and simplicity.
You can use pipeline commands to combine multiple shell
VI editing tool usage:
Common commands:
H, J, K, L correspond to the left, bottom, top, right
CTRL + F flip forward
CTRL + B flip back
0: Move to the first character of this line
G moves to the last row of the file.
N [enter] move the cursor down n
Shell has two built-in variables about time,You have never used it,I have never used it,Today is also the first time to see,So I added a note,For future reference.$Seconds: the time when the script has been run.(In seconds).$TmoutIfTmoutThe
1.Test File status
Table 1 File status test
-D directory-s file length is greater than 0, not empty-F: regular file-L symbolic connection-R readable-x executable
-S file length is greater than 0, not empty-W writable-The U file has
1 Have you ever wondered why SED is called sed?
Sed is short for stream editor. Sed is a stream editor. To put it bluntly, we enter a string of information into SED, which is processed and output. That's simple.
Similar to cut, sed is a row-oriented
5 is there an option in sed? Is there anything that is commonly used?
Sed's most important part is the command part. If you have played this part, you are already very good. The premise of playing this part is to play with the regular expression.
1. system environment variables after the user logs on to the system:$ Home user's own directory$ Path: the directory to be searched during Command Execution$ TZ Time Zone$ Mailcheck the number of seconds to check whether a new letter exists$ PS1
1. Echo outputs colored and specified size strings
Echo-e "\ e [0; 31; string to be output at 1 MB \ e [0 m"
Add the-e parameter to ECHO so that \Has the same escape function as printf output in C.
\ E [0; 31; 1 M indicates that the output character
MAC system startup process
See:
Http://hi.baidu.com/%CB%E6%B7%E7%B6%F8%D0%D01999/blog/item/271d20a694d7d49dd0435842.html
1 MAC boot STARTUP script or application (run shell script when the system starts)
1) if you want to start a Mac application
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