Toggle command line: CTRL+ALT+F1-F6
Switch to graphical interface: CTRL+ALT+F7
Ls-list (dir under Win)White: Normal fileBlue: Catalog FileGreen: Executable fileTo perform the steps:
Input ls
In the relevant directory go to the
CD/: Entry root directory-----------------------[Email protected]:/etc$ CD/[Email protected]:/$ pwdCD ~: Entry user root directory----------------------[Email protected]:/$ CD ~[Email protected]:~$ pwd/home/tangymls : List all files.pwd : Show
& placed after the startup parameter to set this process as a background process
By default, the process is the foreground process, then the shell is occupied, we can not do other operations, for those who do not interact with the process, many
Classification of regular expressions
Basic Regular Expressions (basic Regular expression also known as basic RegEx abbreviation Bres)
Extended Regular expression (Extended Regular expression also known as Extended RegEx abbreviation
Types of variables:1. Custom variablesDefine variables: Variable name = variable value variable name must start with a letter or underscore, case sensitive url1=test.3glong.comReference variable: $ variable name or ${variable name}View variables:
Now every time you analyze the site log, you need to determine whether Baidu Spider is a real spider, after nslookup need to determine if the result contains "Baidu" stringThe following is a list of some of the methods that the shell contains to
First shell script--helloworld[Email protected] ~]# VI sh01.sh#!/bin/bash #! Indicates which shell# this is my first shell script #注释部分echo-E "Hello world!" Exit 0[[email protected]~]# SH sh01.sh # execute SH file Hello world! using bash or SH
One, the file operation1. Expression-D: Whether it is a directory-F: Whether it is a file-E: Whether the file or directory exists-R: Whether the current user has Read permissions-W: Whether the current user writes permissions-X: Whether the current
In the shell, if a piece of code needs to be called repeatedly, the code definition can be called a function, which is called directly in a later script. There are two ways to define a function:1. function functionname {}2, functionname () {}Example:
In Linux systems, it is sometimes necessary to modify the IP address of the network card. In many cases, our maintenance of the Linux system is managed remotely (SSH), so that when the IP address changes, the connection between us and the server
For loopUsage:forindo 循环体doneSo how do you build the list?{1..100}This will generate the list.===========================================Cases:#!/bin/bash#forin {1..100};do echo$IdoneSeqYou can also generate lists with the SEQ commandUsage:seq
ReferenceHttp://www.cnblogs.com/ggjucheng/archive/2012/10/21/2733028.htmlAdd a & after the command, such as Firefox &: Background execution.Jobs-l command lists How many commands are currently running in the backgroundCTRL + Z or send signal 17:
Format: echo "/033[word background color; font color m string/033[control code"If you simply display the font color can be fixed control code bit 0m.Format: echo "/033[word background color; font Color m string/033[0m"Note:1, the word background
1. Find in the -exec Parametersin the current directory ( including subdirectories ), find all txt files and find the string "Bin" containing the the lineFind./-name "*.txt"-exec grep "bin" {} \;in the current directory ( including subdirectories
write a script to generate a random 3-bit number, and can be based on the user's input parameters to determine the output of a few groups. For example, the script name is number3.sh. Execution Method:Bash 2.shproduces a set of 3-digit numbers
Write a shell script that requires you to print a line that contains only a single number in the document:#!/bin/bashfor i in ' cat/root/passwd ';d o n= ' echo $i |sed ' s/[^0-9]//g ' |wc-c ' #echo $n if [$n-eq 2];then Echo $i else continue
The Linux shell is much more powerful in programming than Windows batch processing, both in loops and operations. Data types are not comparable. Here's a summary of some of the things that an individual does when it comes to working with arrays.1.
1.Understanding the main function, UIApplication is the core of the initialization program, which accepts 4 parameters. where argc and argv two parameters from main () accepts two parameters, the other two string parameters represent the main class
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.