There are a number of commands in Linux that can be divided into 10 categories (see [1]): 1) file management; 2) document editing; 3) file transfer; 4) Disk Management; 5) disk maintenance; 6) network communication; 7) system management; 8) system setup; 9) Backup compression; 10) Device Management.
Linux:command1 | Command2
"|" In fact, Linux inside a pipe symbol , the two commands are separated, Command1 output as the input of Command2; You can also use multiple pipelines consecutively , representing the output of the Command1 as the input of the Command2, the output of Command2 as the input of the Command3, and so on.
grep (Global Regular Expression Print)
The grep command belongs to the "Class II-Document editing class", a powerful text-search tool that can use regular expressions to search for text and print matching lines.
> and >> : $ echo "Demo" >de.c (write "demo" to the de.c file, you must bring echo, ECHO is the result to the output file)
If the file does not exist, a new file is created and the data is written to the file; If the file exists, then the file is emptied and the data is written to the file;
>>: If the file does not exist, a new file is created and the data is written to this file; If the file exists, then writes the data to the back of the contents of the file;
BaseName vs DirName
BaseName: base name, file name; DirName: directory name, Path; It can be distinguished by the meaning of the two.
basename /etc/bin/sortsortdirname /etc/bin/sort/etc/ basename/dirname /etc/
[1] Linux command Daquan: http://www.runoob.com/linux/linux-command-manual.html
[2] Learning linux,101 (IBM's tutorial, very good): https://www.ibm.com/developerworks/cn/views/linux/libraryview.jsp?search_by=%E5%AD% A6%e4%b9%a0+linux%ef%bc%8c101
[3] Linux Shell Scripting turotial:http://www.freeos.com/guides/lsst/index.html
Shell Programming Learning 2--Command Daquan