The most common Linux commands and toolsDirectory Next document: CD nameReturn to the previous directory: CD.To view and edit a text file:? View files: More, tail? Edit File: VIsuch as scripting. SHVI shell.shTo view system network status:? View
There are two types of Linux users in the world: adventurous and cautious.One type of user is always instinctively trying any new choice that can poke its pain points. They have tried countless window managers, system distributions, and almost all
The value of the variable in the shell, if you do not specify the type manually, the default is the string type:For example:A=123b=456C= $a +#becho $cThe result is output: 123+456In the shell, if you want to perform numeric operations, you can do
Recently in the Zabbix, the company has six new servers. When the Zabbix client is deployed, the baby is really angry. Grandpa's always so repetitive work is also not AH. But as a war five slag, what else can be mixed with rice? Think of last year
Background: defines a function that is different than the number of local and online server clusters, and wants to get the number of distinct clusters. The function return value of the shell and other languages is quite different. Define a
Morning log in the server compiled to run the service-side program, learned that after the command after the character "&", quit the shell, run the command can continue to run. Puzzled the reason, and to search the following online, understand the
Linux File SystemLinux speaking files are stored in a single directory structure (virtual directory), and the virtual directory contains the file paths of all the storage devices installed on the PC.The more complex part of the Linux virtual
Static language: Compiled languageStrongly typed (variable) converted into executable format beforehandC C + + Java C #A variable of a strongly typed language must be declared beforehand, or even initialized, before it is used.Dynamic language:
Bash supports many operators, including arithmetic operators, relational operators, Boolean operators, string operators, and file test operators. Native Bash does not support simple math operations, but can be implemented with other commands, such
The return status value of the shell environment based on the command execution ($?). ) to determine if the execution succeeds, when the return value of 0 indicates success, otherwise (not 0 value) indicates a failure or an exception. Using a
Calculate the sum of the 1~100 of the word:
Require the accumulation of numbers, you can use the loop to complete, the following code:#!/bin/bashsum=0str= "" #for i in {1..100}for ((i=1; iTo run the script:650) this.width=650; "src=" Http://s2.5
9 Kinds of interception of strings in shell, take var=http://www.google.com/test/.html as an example(1) Method one: # Intercept, delete the left character, retain the right character.Echo ${var#*//}var is the variable name, and the # is the operator,
Sort-u and Uniq can play the role of removing duplicate information, so where is the difference between them?$ cat TestJasonJasonJasonFffffJasonThe following three commands are executed separately1:sort-u TestSort-u TestFffffJason2:uniq Test$uniq
SHELL---string interception1, by the specified string interception (4 kinds)
${varible##*string} # to truncate the strings after the last string from left to right ${varible#*string} # to truncate the strings after the first string
One of the first few instances of the Linux shell intercepting strings, the first 8 bits are intercepted:The method is as follows: A=1234STERRERWRWRETW below1.expr substr "$a" 1 8 650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8
Because the leader put forward the need to see a few times a day the server traffic map, this morning 9 to start work, more than 10 servers, the designated time 12 hours traffic map, cut over the chart repeatedly control several times, one is afraid
Special variables
Variable
Meaning
$
File name of the current script
$#
The number of arguments passed to the script or function.
$*
All parameters passed to the script
Hive command Line Common commandsLoading dataLoad data local inpath '/home/ivr_csr_menu_map.txt ' into table ivr_csr_menu_map;Partitioned by:Load data local inpath '/home/lftest/lf1.txt ' overwrite into table lf_test partition (dt=20150927);Add
1. Introductiontake the home of Mechatronics website as an exampleafter the preliminary analysis, the electrical and mechanical Home data volume is large, and the data organization rules are more unified, suitable for code-based full-amount crawling.
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.