In Android development, this command can often be used adb shell dumpsys to dump the state information of the system runtime, for example, to view the memory usage information of an applicationadb shell dumpsys meminfo
1. Determine if a file is a block or character device file, and if it is copied to the/dev directoryRead-p "Input a file:" filenameIf [-B $filename-O-C $filename]ThenCP $filename/dev/Fi 2. Write a script to perform a simple subtraction operation
1. In the current directory, look for the files that were accessed within 20 minutes, and display the details of the file:Find./-name ' *.log '-mmin-20-exec ls-l {} \;Note: where {} is replaced by the file name, and the colon is used to indicate
Twenty. To get the system run data through the pipeline Combination shell command :1. Output the 5 most memory-intensive commands in the current system:#1) Lists all the processes that are running on the current host through the PS command.#2) The
1, dirs1) Functiondisplays all records in the current directory stack (the dirs command with no parameters displays the records in the current directory stack)2) Syntax(1) format: dirs [-CLPV] [+n] [-n](2) Options-C Delete all records in the
There are two ways that Linux shell executesShell scripts start with #!/bin/bash, and the shell is executed with the first row checked and executed internally in the following ways:$/bin/bash script.sh1. Execute with SH.$sh script.sh #脚本位于当前目录下Or$sh/
1. Get specific information from a string of stringsRequirement 1: Get the IP profile of the native IP:menu.lst as the system mirror, and need to obtain the native IP information from the file (get information from the files)1Timeout12 default 03 4
in recent daily work, we have often been dealing with Linux servers, such as Oracle performance optimization, resource utilization monitoring of our data acquisition servers, and debug server code and resolve its efficiency and stability issues. So
[grep profile : ]grep is used to filter lines that contain specific charactersusage: grep ' pattern ' fileFor example: grep ' BBB ' aaa.txt--color # Search for the keyword BBB from the file Aaa.txt and highlight it.[Regular meta-character :
Linux class Assignment Wednesday, if there is a poor consideration to the place, also please advise.Shell Processing Text See this blog for common commands related to##如果输入两个参数 is the first to count the number of words, the second is the article to
LINENO
The row number of the script or shell function currently being executed.
LINES
The select command is used to determine the width of the selected columns. After receiving SIGWINCH, It is set automatically.
MACHTYPE
Is a string that
Loop Control Structure of shell script Programming
Loop Control-for Loop
Syntax 1
For Variable in List
Do
Commands
Done
Syntax structure 2
For Variable in List; do
Commands
Done
This List can be a List, variable, command, etc.
A for Loop provides an
In some scenarios with high security requirements, the ssh timeout period is preset by the Administrator. After a period of time, the ssh connection is automatically disconnected. In this case, if you execute the script through ssh and the script
Shell Program Design (2) Shell syntax Variables
In shell, variables do not need to be declared before they are used. By default, variables are stored as strings, even if they are assigned numerical values. Shell and some tool programs convert
Shell programming (3) shell Syntax Functions
To define a shell function, we only need to write its name, then a pair of empty parentheses, and then put the related statements in a pair of curly braces, as shown below:
Function_name
Preparation: 1. Prepare the rpm file to be installed.2. Write the rpm file to the file list pkg. lst (the file name is optional)3. install. shDirectory structure|-Install. sh|-Pkg. lst|-Readme.txt|-Xxxx. rpm|-Yyyy. rpm|-Installation process: 1. Put
Conditions are required for exporting data from mongodb
Currently, time is stored in milliseconds. Therefore, you must obtain the number of milliseconds from the shell.
The first thing to say is the + % s parameter of the date command.
I searched
Test File OPERATOR:
-B file: if the file is a special file, it is true.
-C file: if the file is a special character file, it is true.
-D file: if the file is a directory, it is true.
-E file: true if the file exists
-F file: if the file is a normal
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.