Linux command line Text Processing tool file Browse Cat view file contentsMore view file contents as page flipping (page down only)Less view the contents of a file as a page turn (page up or down)Head view the beginning of the file 10 lines (or the
First, the basics of learning Shell scripts" Special symbols in theLinux shell "1. * : Represents 0 or more characters or numbers.Test can have no characters, or multiple characters, or it can be matched.2.? : represents only one arbitrary
FileRole: View the type of fileCommon options:-B does not display file names when listing file identification results-F list file type of file name (equivalent to write file or directory location in a file, bulk view, after F to follow the
I. Common commands for file and directory managementDirectory operation commands:pwd,cd,ls,mkdir,du,File Operations Command:Touch,file,cp,RM,MV,which,find,LnFile Content Operations Command:Cat,more,less,head,tail,WC,grepArchive and Compress commands:
1. lsdisplaying directory folders and filesHow to use: ls-lt-a displays all files and folders included in the directory. And.. -A display directory where all files and folders are not included. And.. -l Displays all file and folder details in
Shell programming1 echo-e recognition \ escape character \a \b \ n \ \x hex \ 08 Binary, etc.#!/bin/bashEcho-e "Hello World"Execute script: Mode 1:chmod 755 hello.sh./hello.shWay 2:bash./hello.sh (this way does not need to give execute permission)1
A ShiftParameter shift LeftUntil [$#-eq 0]Doecho "The first parameter is: The number of arguments is: $#"ShiftDoneTwo WcThis command is used to count the number of bytes, words, and lines in the specified file. The command options have the following
The shell is the interface between the user and the Linux operating system.CCat Zdd Browse the contents of a ZDD fileCat Zdd1 Zdd2 Browsing the contents of multiple filesCat-n ZDD Browse the contents of a file Zdd and display line numbersCD back to
Linux Text Processing ToolsWC Print the number of lines, words, and bytescut split text by column Sort Sortsuniq Eliminating duplicate rows
WC print the number of lines, words, and bytesGrammar:WC [OPTION] ... [FILE] ...Options:-l:line count
2016-08-04Content of the lesson:Various text tools to view, analyze, and count text files (more, less, cat, cut, sort, WC, uniq, head, tail, paste, diff)GrepRegular expressionsExtending regular Expressions"" All text viewing, analysis, statistics,
CCat Zdd Browse the contents of a ZDD fileCat Zdd1 Zdd2 Browsing the contents of multiple filesCat-n ZDD Browse the contents of a file Zdd and display line numbersCD back to the start directory, that is, just logged into the system directory, CD
1.pwd CommandDisplays the full path name of the current work.2.Date CommandDisplays the current date and time of the system.3. WhocommandDisplays all user names that are currently logged on to the system, their terminal names, and the time they
1. PWD: Show working directory path
-P: Show actual physical path
-L: Show link path
2. CD: Change the working directory path
CD: Go to User's home directory
cd~: Go to User's home directory
cd-: Returns the
Linux commands are commands for managing a Linux system. For Linux systems, whether it is the central processing unit, memory, drivers, keyboards, mice, or users are files, the Linux command is the core of its normal operation. Next, take a look at
variables, functions, definitions and references, which are expressed in many ways, I choose the following:
Variable name = ' destined ' #变量定义$ variable Name #变量的引用Function name (){Destined 1;Destined 2;.....} #函数的定义Function name #函数的引用For
First, shell overview1.Shell Overview:Shell: Shell, a shell is a command-line interpreter that provides users with an interface-level program that sends requests to the Linux kernel to run programs, and users can start, suspend, stop, or even write
After the previous study, probably understand the computer composition principle and some knowledge of the operating system. Although this knowledge is trivial, pieced together, in the future work and study still need to have a deep understanding.
1,echo "AA" > Test.txt and Echo "BB" >> test.txt//> Empty the original file, and the content is written to the file,>> put the content to the end of the file2,chmod go+w-r/home/zhangy//Add Write permission to group users and other users3,TAR-TZVF
1,echo "AA" > Test.txt and Echo "BB" >> test.txt//> Empty the original file, and the content is written to the file,>> put the content to the end of the file2,chmod go+w-r/home/zhangy//Add Write permission to group users and other users3,TAR-TZVF
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.