Liunx Text Processing Basic command is not bypassed by operations engineers, must be familiar with the key commands, they are combined like a door, is the path to the text of the Three Musketeers (Grep,sed,awk) and Shell script programming.Updated
Use the Vmstat command to view system resource conditionsHow do I see CPU, Memory usage, network traffic, and disk I/O in command line mode?Q: How can I view CPU, memory usage, network traffic and disk I/O in command line mode?A: In the command line
grep is used for keyword search text -I ignores case when searching -n Displays the number of rows in the result -V output row with no keyword -ax the specified number of rows after the row of the result is included in the output - BX when the
Wildcard characters for file names:[0-9]\[a-z]\[[:d Igit:]]\[[:alpha:]]\[[:alnum]]\[[:upper:]]\[[:lower:]]\[[:black:]]Rename renaming# Rename. txt. xsl/appTreeView Structure-d-lTr# ifconfig eth0 |tr A-Z A->ip.txt you can save by converting and
Course Outline:1. Shell FeaturesOrder history!! !$!n! characterTab key to complete file path or commandAlias a= "B" Unalias AWildcard * Matches 0 or more characters? Match one characterinput and output redirection;, >>, , 2>>Pipe symbol |Job Control
Linux scripting is not too strong, and recently tutorial, after all, Linux shell in the daily work is still very common,It is more convenient to use, save time and effort.Here are the study notes, partial theory, followed by a few examples for
Here are just some of the usual, probably not all, welcome additionsCD Switch DirectoryCd.. Switch to upper-level directoryCD-Switch to the last directoryCD ~ Switch to user home directoryPWD View your current directorymkdir Creating a new directory-
Useradd Username adding usersUseradd-g GroupName Uernamepasswd Zhaoyuanyuan Add a password to the added user, you can also reset the password~ Wavy lines represent home directoriesCD ~ Quick Home CatalogueSU Username Switch directorySu-username
3. Bash 's basic features3.1 Historical Command and command completion (1) History command :#history [Options] [history command Save file]① option:-C: Clears the history command;-W: Writes the history command in the cache to the file ~/.bash_history(
" *.txt " " *.pdf " \)-printRegular find all txt and PDF files in root directory Find/-regex ". *\ (\.txt|\.pdf\) $" Find all non-txt text found. ! -name "*.txt"-print Make search depth Find ~-maxdepth 1-type F Search by Type: Find. -type d-print
One, the command to view the fileFor a text file, there are several ways to view the contents of a file in Linux, such as displaying the entire text content directly, paging through the content, or viewing only parts of the file at the beginning or
File, Directory ClassFile view, processingCat file # Displays the contents of the fileCat-n File # Displays the number of line numbersCat file1 file2 > File3 # Merge the contents of the file File1 and file2 into the new file File3Head File #
1. Folding 1.1 folding in six different ways manual: Define the range of folding spans in a standard vim structure, like the move command & nbsp; indent: Collapsed and collapsed hierarchy, corresponding to the indentation of
1. What is the symbolic representation of the absolute path? What is the current directory and top level directory used for? What does the home directory say? What are the commands for switching directories?Absolute path such as:/ETC/INIT.DCurrent
Classification of Linux commands
Meaning of options and parameters
With "-" to boot the short format option (single character), e.g. "-l"
"--" to boot long format options (multiple characters), such as "--color"
commands for text-processing classes : Wc,word count Ctrl+d SubmitNumber of lines of words bytes WC [option] [File] ... - L: Count rows - C: Statistics of bytes - W: Count the number of words TR: Convert or delete character,
Command format:WC [Options] File
Command function:Number of rows, words, and bytes of the statistics file
Common options:- C statistics byte number- L count rows- W statistical number of words
Common examples:Example one: View the number of
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.