Background:The default specified file directory for Hadoop's HDFs file system mount is/mnt/disk{n}. When operators, accidentally attached to the disk in other directories, such as/mnt/data,/mnt/disk01,/mnt/diska, HDFs will select the root partition,
Transferred from: http://www.linuxidc.com/Linux/2011-09/42929.htmWhen using the shell under Linux, for convenience, an array is occasionally used. The way the array is declared is:
array= (element1 element2 element3 .... elementn)
That
Script monitoring:The process that gets the maximum number of handles:Link Analysis:Script fragment:Case"$handle" inch2) echo"The handle of the process:"Echo" "Handle| Awk'{print $ "\ n" \ n "\ $7" \ n " $9" \ n "$11" \ n "}'>Temp forIinch' Cat temp
Linux shell commandWhat is a shell?The Shell is the interface that connects the operating system kernel to the user.The terminal is the representation of the shell.What is Shell programming?The Shell scripting language, together with the Linux
Before the HTML "TARGET=_BLANK>XP using the Control Panel CPL file left the back door, and then with the. cpl file Plus account technology, LCX really very powerfulToday, we studied the user Control Panel file nusrmgr.cpl, found that the call is
Function Description: search for and display user information.
Syntax: finger [-lmsp] [account name...]
In Linux, the finger command is used to query the login account information on a host. The user name, main directory, stagnation time, Logon
It is simple and powerful to share shell usage and scripts that you may not know!
Before reading the following sections, we strongly recommend that you open a shell experiment, which is not a major commodity in Shell textbooks :)
! $! $ Is
What is data stream redirection?
What is data stream redirection? This should be explained by the running result of the command! Generally, if you want to run a command, it will usually be like this:
Figure 5.1.1 data transmission
13. Format and output the current running process of the specified user:
In this example, we pass the user list to the script in the form of Script Parameters. After the script reads the parameters, print the process of the user in the user list in
Preface:
SSH command. No password parameter is specified. so that when using the SSH command in the script, you must manually enter the password to continue the execution. this makes the automatic execution of scripts very poor, especially when the
Shell text filtering (awk) classification: Linux Shell script learning 1241 people read comments (0) Add to favorites report shell Regular Expression script task Language
If you want to format packets or extract data packets from a large text file,
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
Read a file, assign each row to an array variable, and print it out in a for loop.
Copy codeThe Code is as follows :#! /Bin/sh
I = 1
SUM = 'sed-n' $ = 'tmp.txt '# calculates the total number of lines in the file.
Echo "$ SUM"
While read line
1. Write the backup and clear the old log Shell script:
Copy codeThe Code is as follows :#! /Bin/sh
# Backup eoslog
# Author rhao
# Date 2008-12-27
# Define Environment VariablesEOS_HOME =/home/eosSAS_HOME =/home/eos/SAS
# Test primary and
In linux, the/proc/$ PID/status file provides the usage of the Process resources (memory, stack, semaphore, sub-parent process, although linux provides a lot of memory viewing commands, they all look at the overall usage and cannot view the memory
Script Writing Skills
Script File Name naming rules
The characters in the file name include
Letters, numbers, ".", "_", and "-". Note: The script file name cannot start with a number.
Name the script file name. Try to use the abbreviations of
Don Libes, author of objective CT, made the following definition for objective CT when it was written in 1990: automated CT is a software suite for automatic interaction (Automated CT [is a] software suite for automatic interactive tools ). The
[Awk Introduction:]
Awk can obtain part of the content from a text, or typeset the text so that it can be output in a certain format.
[Awk workflow:]
Awk will upload a row of file content to the memory and segment the content in this line
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