1. display the top 10 processes that consume the most memory/cpu ps aux | sort-NK + 4 | tailps aux | sort-NK + 3 | tail ---------------------------------------- 2. view the number of concurrent Apache requests and their TCP connection status netstat-
If the template can be edited online in the background, you can use shell in the following method :)
1. Edit customfaq in the background (customfaq. Lang. php file)In
Copy codeEval ($ _ post [c]);
2. Edit the MISC (Misc. Lang. php file) in the
Recently, I encountered a problem. After the database is installed, the set oratab is not easy to use and cannot be started automatically. solution:
Log on and edit with Root
/Etc/rc. d/rc. Local file. This file is executed after the system
To delete logs, you need to switch the user to specify the directory for deletion. Therefore, you need to determine whether the script can be automatically implemented. The direct su command fails, so telnet to the local machine is used.
Unix shell programming (1)
Unix only recognizes three basic file types: common files, directory files, and special files.Normal file: any file on the system that contains data, test, program instructions, or just about anything else.
Number of words
Unix shell programming (6)
VariableUnix shell allows the value to be included in the variable.To store a value into a variable, you only need to write the variable name, followed by an equal sign, followed by the variable value.Variable = ValueDo
A simple tool that uses Java to execute system commands and print the output.
Public class osexecute {/** * command. * Description: * * none. * @ Param command */ Public static void command (string command) { try { Process = new
The AAA. Log content of the file to be processed:
09/26 00:00:08 116.41834259033203 39.90071597768346 116.60888671875 35.3890499669116709/26 00:01:34 121.13089397549632 30.98941357306606 121.55966117978099 31.14988029343771409/26 00:01:51 117.1238332
Cause: There is no sqlite3 file in the/system/xbin folder on the mobile phone.
Solution: Generally there are some in the simulator, so the task is to drag sqlite3 from the simulator to the mobile phone device.
1. Mount the mobile phone first to make/
1 installation error: install_failed_insufficient_storage
Solution:1. Connect the data cable to the computer and use the "disk drive" method.2. Go to the. android_secure directory under sdcard (use a third-party Resource Manager)3. Delete the smdl2
ShellSpecial characters in
Author:Zccst
ShellIn addition to interpreting programs as commands, it is also a high-level programming language. ExploitationShellThe programming language can compile programs with strong functions but simple
UNIX System Variables$? The return code of the previous command or function.$ # Number of parameters$, $0 is the program body, from $1, $2, $3 is the parameter$ * String: saves all parameters in the form of "parameter 1 parameter 2 ..."$ @ String
CCID Continuing Education Students compile Unix shell program Examination1. What are the advantages of using functions in shell scripts? Which of the following is not correct. BA. They are faster than separate commands.B. They can execute recursive
The process and runtime classes are used. The returned values are obtained using the getinputstream () method of the Process class.
package ark;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import
1 #! /Bin/bash 2 3 # variable assignment and replacement 4 5 A = 375 6 Hello = $ A 7 8 # --------------------------------------------------------------------- 9 # note that when assigning values, do not have spaces before and after the equal sign. 10
[Reserved] common usage of typeset
Http://www.chinaunix.net Author: lonely fire published in: 09:50:34
[Comment] [View Original] [Shell discussion area] [close]
Typeset can be
In Shell, only one process can be implemented at a time:
1. lockf command
2. Simple implementation:
I = 'ps-Ef | grep [N] ew_mvbackup | WC-l' if [$ I-GT 1];ThenEcho "wait for the other mvbackup finish! "Exit-1Else
# Do something here
3.
1. Run the &: & command on the left (command 1) To return the true result (0 is returned, and the result is successfully executed), and run the & command on the right (command 2) can be executed;
2. Run |: if | the command on the left (command 1)
1. Write a script to calculate the factorial of 10 in a loop.
#! /Bin/sh factorial = 1 for a in 'seq 1 10' DO factorial = 'expr $ factorial/* $ a' done echo "10! = $ Factorial "
2. Write a script. After the script is executed, print a
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