Recently, to the internal network for debugging and access, bought 3 peanuts can only map 6 ports, is not enough to meet the needs, just have a friend to me said Ngrok can also be carried through the intranet, research for a few days, light
Variable Description:$$The shell itself PID (ProcessID)$!The PID of the Shell's last running background process$?End code of the last command to run (return value)$-Flag list using the SET command$*A list of all parameters. Output all parameters in
Own small website runs in the Aliyun ECS above, occasionally also analyzes own website server log, looks at the website the amount of visits. See if there's any black-and-wide sabotage! So collect, organize some server log Analysis command, we can
The tree command is the protagonist of printing files and directories in a graphical structure. This command is not normally included in Linux distributions. You need to install it yourself with the package Manager.
Instance:
1. Tree
Print all
Shuf-n5 Main.txt
Sort-r Main.txt | Head-5
awk-vn=5-vc= "' wc-l file '" ' Begin{srand () while (n
While read Line;do echo "$line $RANDOM";d One
Options for the Shuf command:
-E,--echo: treat each parameter as an input line-I,--input-range=lo-hi:
Requirements: Delete files, directory structure: ip/year/month, everyone has a copy of this directory now need to delete all files before 2012, 2012 after the deletion of a specific month.Originally wanted to use find, the results found that these
There are shutdown, halt, reboot, Init for Linux down and restart systems, and their internal processes are different for them.
Another year, into 2010 years, in the last year maybe Microsoft grabbed the halo of Linux, but for the development of
The last article introduced the Linux to build the FTP server method, said the basic configuration of vsftpd, that is, anonymous and local, this time to configure the virtual user to use VSFTPD, the following is the specific steps:
First, establish
Here today we discuss a very funny system configuration error in Linux systems, which is sudo, and why it's funny, because if it's improperly configured, it's easy for the average user to claim root, and without a bit of technical content, System
centos6.0 is installed, many packages are not installed because a minimal installation is selected, so some commonly used commands are not supported, as follows:# SCP-bash:scp:command not found
My solution is to find the package on the SCP on a
In Java,python, you can use the import method to make calls between scripts or modules, for example:
Copy Code code as follows:
>>> Import Math
>>> Math.sqrt (4)
2.0
How do you invoke other shell scripts in the shell, or
The previous script is in save mode, now attach the command to a file, so that it can be easily modified two times or somethingThe script is basically like this, we can change with their situation again ~ add function or something.
1. Use of time-related random numbers
Generate output Unixtimestamp (%s) and current time nanosecond data (%N, accurate to one-seconds) using the data command. )
The former ensures that the output does not repeat in different seconds, and that the
Linux text processing tools are very rich and powerful, such as a file:
Copy Code code as follows:
Cat Log
Www.jb51.net 192.168.1.1
Www.jb51.net 192.168.1.1
Www.jb51.net 192.168.1.2
Ffffffffffffffffff
Ffffffffffffffffff
Add: This is valid for the first time to add a network card, if you need to repeat the addition and deletion of automatic configuration, you need to change the script, according to the IP a command information to modify.
Copy Code code as
Command substitution means that the Shell executes a command and replaces the command substitution with the result of executing the command.
There are two ways to replace a command:
1. Use backtick symbols (i.e. ..., inverted quotes, accented
I see in the study not only has the break and the continue existence, as well as break-n and the continue-n existence so what difference does it have.You can then write the test set code:For i in a B c DDoEcho-n $iFor j in ' seq 10 'Doif test $j-eq 5
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