1. Description
Top selection parameters
2. Option
①-B runs in batch mode, but cannot accept command line input;
②-C: displays the command line, not just the command name;
③-D N indicates the interval between two refreshes. For example,-D 5
Shell commandsXargs
Build and execute command lines from standard input
Xargs can be readStdinAnd use a space character or line break character as the resolutionStdinData is separatedArguments.
1) Description
Xargs [-0epn] command
Options
1,Which
Which-shows the full path of (Shell) commands.
Which [Option]
2,Whereis
Whereis-locate the binary, source, and manual page files for a command
Whereis [Option] filename
3,Find
Find-search for files in a directory hierarchy
Find [
20. Use the shell command in the pipeline to obtain system running data:
1. output the five commands that occupy the most memory in the current system : #1) run the ps command to list all processes running on the current host. #2) The fifth
Bash -- DebuggerScript Script-arguments... Having used to VIM, writing BASH Shell also uses it. Generally, shell is short, so there is no way to improve efficiency, today, I accidentally saw someone mention a bash support plug-in for
I found an example online, which is simple and practical as follows.
There can be a background process that takes some operations when timer times out.
#! /Bin/KSh # delaytime = 0 alarmhandler () {echo "Get sigalam" killsubprocsexit 14}
Previous
We all know that Linux Shell is very powerful in text processing. There is a powerful set of text processing tools: grep, sed, awk. Grep is often used for searching and matching text and SEDCompositionThis edited replacement and awk are
Original article link
While read wone wtwo wthreeDo[-Z $ wone] & continue # test whether the content of this row is emptyXxx = $ wone # extract contentDone Echo "$ XXX" # The variable obtains the content in the file.
The following methods cannot
Conditional Criterion
Just talk about 『Program", Then the conditional criterion, that is, the criterion" If then ", must be learned! Because in many cases, we have to determine how the program should proceed based on certain data.
If... then
The shell kernel is an interface between the user and the kernel. The shell protects the internal kernel. The shell programming is similar to the batch processing file in DOS, which is called shell script and shell command file. SlaveProgramFrom the
Write a die function in the directory Mind Map Sequence
You must use the root account to execute this script and run the command line to pass the parameter to kill the local literacy summary Mind Map of the specified process.
Accumulate some
Recently, we are busy developing data synchronization for Douban, mainly because the Douban interface is not powerful and the data cannot be captured when the access volume exceeds a certain value. Therefore, we decided to import Douban data to the
ShellProgramDesign Process Control
Like other advanced programming languages, shell provides commands used to control program execution processes, including conditional branches and loop structures. You can use these commands to create very
Application-> accessories-> TerminalSpark @ spark-desktop :~ $~ Means:/home/spark$ Menas: normal users (# means root)
Hundreds of commands can be used in Linux, only 10 to 20 command areUsually used in everyday life.
Command:-- Help: Option
I have not published my blog for two days. I decided to keep writing my blog every day. It seems that I am too lazy sometimes, and I will always make excuses to stop writing. I am so tired today and I will try again tomorrow, I did not write the
16. Find:
The following is an example of how to use the find command:/> Ls-l# List the test files contained in the current directory-RW-r --. 1 Root 48217 Nov 12 00:57 install. Log-RW-r --. 1 Root 37 Nov 12 00:56 testfile. dat-RW-r --. 1 Root 10530
My colleague asked me a question about awk today. It means that the several rows of data obtained through the awk operation are not fixed. You need to store the obtained rows of data in an array and do not want to use loops. After one afternoon's
1. http://edsionte.com/techblog/archives/3712 echo and backslash
Group records:2. This is only a variable. Double quotation marks will prevent shell tokens from echo "a B" and echo a B.
3 --------
4 "a B" is a parameter of echo, while echo a B is
It may have been a long time to stay in the shell, so that the current world is almost confused.This is the case when developers are busy with development and do not know the changes in the environment around them all day long. Maybe in
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