A directory structure .linux
1. The role of common subdirectories
We extend about
proc: prevent memory, CPU and other hardware info
tmp: temporary directory
lib and lib4: library
mnt: Multimedia
II. We began to learn command
1.cat command: show the contents of the file
cat command drawback: You can not use the mouse to drag the view in the character interface content and only display the contents of the end
2.more order: Full page display file contents fractional
more command Cons: turn the last page on the return
3.less command: command and more the same, but more extensions
4. Review the contents of the file, head, tail command
1.head: View part of the beginning of the file (the default ten lines)
2.tail: you see the part of the end of the file (the default ten lines)
5. Statistical command file contents WC
6.greb command finds and displays the line containing the specified string in the file
1.greb
2.greb -v
7. compress command gzip, bzip2 command
We found that these two commands after making the compressed file is gone, finished only decompression
8. Archive command command ta
1. Know It's commonly used commands
-c: create a tarball -x: unzip
-v: Show Details -f: execution
-p: Keep Source entitled -t: View archive content
-C: extract the target path -z: gzip format
-j: bzip2 format
2. we experiment a bit
-j: bzip2 format, too, after this we will find the path specified file content which is equivalent to the same copy.
III. Vi text editor, command
1. The role of the text editor
2. The three operating modes
Extended about: O: Insert the cursor on a line
o: Insert the cursor in the next row
a: after the cursor in the content
i: before the cursor Inserts
us to understand what this picture: I entered vim file name on the Shell, enter the command mode, which is input through the input mode ai, o, O, I press ESC back to the command mode, press: Go to the last line mode, press ESC to retreat to the command mode.
3. The basic operation command mode
Copy, paste, delete
We want to practice more, each command will try to
expand it: dw: Delete the word under the cursor
ddp: the cut line on the next line
shift + r: Replace the word cursor
File contents to find, edit, and save and exit revocation
I checked that services
Save the file and exit the VI editor, open a new file or read other file content
1. I will create two files
2. Then I first file from the command mode to the command mode of the second file
The basic operation of the line mode
1. The first line of this became the
2. put all this became the
That's all ours, we hope to engage in active practice.