The conversion character of the shell command line is \ www.2cto. comecho $ PATH // get the current value of the system environment variable include a file (class) to: 1.4. # ifndef_ALARM _ # define_ALARM _ # endif extract and copy method: (c... for the unix command line, the conversion character of shell command line is \ www.2cto.com echo $ PATH // get the current value of the system environment variable include a file (class) to: 1.4. # ifndef _ ALARM _ # define _ ALARM _ # endif extract copy method :( cp/home/allen/materials/code-linux.tar.gz. /) tar zxvf code-linux.tar.gzpwd path mkdir create folder ls-a-f-l (permission) man command query command use method delete folder rm-drf rm Dircp copy mv name1 name2 modify name copy folder-Rtouch a.txt create file www.2cto.com set permission chmod + x hello. c (add)-wrx hello. c (missing) a + wrx hello. c (all) view the ps ux (self) ps aux (all) cat hello. c open hello. c less hello. c more hello. ckill-9 (forced) process id kill process kill all name cat hello. c> hi. c (overwrite) cat hello. c> hi. c (add) vim program n yy p (copy and paste multiple rows) n dd (delete multiple rows) u (back) ctrl + r (forward) in the vim program, set nu (with a row number) set mouse = a (enable mouse support) w writes q and exits q! Force exit df-h (file system mount point k blocks used for use %) cp file path + file name ~ (Path name) trace program strace pwd./hello & (run and get process id) cd ...~ To change the path of the vim program to search up from the current cursor position, use the following command:/pattern Enter (last line mode) to cancel and Enter a mode that does not exist. To search down from the current cursor position in the vim program, run the following command :? In the pattern Enter field, press n or N or place. n: continue to search in the same direction: place. N: search in the opposite direction. To search for the place that appears only at the beginning of the row, add a plug-in sign (^):/^ place Enter before the word to search for the place that appears only at the end of the row, add a currency symbol ($) after the word ): /place $ Enter escape character \ make $ of \ $ change to common character find path-name file name whereis file name exit execute ctrl +/, ctrl + c, ctrl + qgcc aa. c error2e. c-I .. /include/(main file include apue. location of h)-o shellmecho $ path printing variable debugging tool: gdbstart next (n next) s (inside the function) p variable name printing variable c (continue) break 188 sets the breakpoint finash exit function q exit gdb l list the source code query a keyword (pipeline character) find in the file found by the find command. /-name M Akefile | xagrs grep GCC if not, remove the xagrs if not found. if not, an error is returned. if not, the grep 'ABC folder name is written incorrectly. result: show the number of matched grep-n "sdkfj" folder name show the matched row number and content-B, -- byte-offset print the block number of the row before the matching row. Rm-rf folder name force delete non-empty directory mv original name change name diff file name 1 file name 2-y-w (view the difference between the two files) another frequent error: stdlib. h stdiol. h and so on are caused by the inclusion sequence problem. in vim, the new file name vs (used to open multiple windows) ctrl + w (Switch window) www.2cto.com 1, grep: search for regular expressions and print out grep (most commonly used), egrep (extended grep), and fgrep usage: grep [options] 'pattern' file... eg: grep 'root'/etc/passwd option:-I is case insensitive-v reverse display, only the unmatched-n is displayed. the line number of the matched row in the original text is-An (after) display the n rows after the matched rows as well-Bn (before) and the n rows before the matched rows as well-Cn (context) the n rows after the matched rows are displayed in the pattern: the regular expression is used to form the ^ escape character-the first line separator-the last line identifier. --- used to match a single character * --- match 0 or multiple characters before * to match roo, roott, roottt ,,,\ <词首定位符 \> Tail separator \ At the beginning and end of the word, locate \ {root \ {1 \} \ (\) eg: \ (root \). * \ 1 able \ 1 references any eg:/[Ll] ove/[x-y] in the root [] matching group of characters to match a character eg in the specified range: /[A-Z] ove/[^] match the character eg: [^ A-Z] \ which is not in the specified group to escape the special meaning of the followed metacharacters or wildcards. Eg: love \. \ <first separator eg :\ Eg: love \> \(... \) tags matching the characters to be used later: \ (love \) able \ 1 able match the loveableloveable string x \ {m, \} character x repeated at least m times x \ {m, n} character x repeated m to n times egrep added metacharacters 1. + matching the character eg: '[a-z] + Ove' before one or more plus signs matches one or more lower-case letters followed by the ove string 2 .? Match another character or a leading character, that is, the character before it may have no 3. a | B matches a or B eg: 'Love | hate' matches love or hate 4. () the character group eg: love (able | ly) matches loveable or lovely 2. the cut command is used to cut the data in a text file, A text file can be a field or a character type. The latter data type is especially convenient when you need to cut a specific column from the file. Syntax: cut-c list [file...] cut-f list [-d delim] [file...] purpose: select one or more fields or a group of characters from the input file, and use the media transcoding queue to perform further processing.-The c list is mainly character-oriented and can be clipped. List is a character number or a range of characters-d delim using the-f option, using delim as the delimiter. Eg: cut-d:-f1/etc/passwd (cut with colons) cut-d ""/etc/passwd (cut with spaces as delimiters) -f list is mainly composed of fields. operation 3: pipe | pipe: the output result of the previous command is used as the input content of the next command. Usage: command1 | command2 | command3 | ...... Eg: echo redhat | passwd-stdin student (change the student password to redhat) tee function description: read standard input data and output the content to a file. Eg: ls/etc | tee/tmp/ls. out | less (tee converts the content from ls/etc into two copies, one for output to/tmp/ls. out, one copy can be viewed using less)
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