1. Using the cat command to merge files vertically
1) Master the vertical merging of files using the cat command:
A) For example: Use the cat command to vertically merge the three files of Baby.age, baby.kg, and baby.sex into a baby file:
Cat Baby.age baby.kg Baby.sex >baby
b) For example: Use the Cat command to add the contents of the Baby.age file to the Baby2 file:
Cat Baby.age >>baby2
2. Archive files and archiving technology
1) Mastering the definition of archiving: Archiving (archiving) is the packaging of many files (or directories) into one file.
2) Understand the purpose of archiving: The purpose of archiving is to facilitate backup, restore and file transfer operations.
3) Master the function of the tar command: put multiple files (which may also include directories, because the directory itself is also a file) in a tape or disk archive file. And in the future, you can restore only some of the files specified in the archive as needed.
4) Master the common options for the tar command:
C: Create a new tar file.
T: Lists the contents of the directory in the tar file.
X: Extract the files from the tar file.
F: Specify the archive or tape (or possibly floppy) device (typically selected).
V: Displays the details of the packaged file, and V is the 1th letter of the verbose.
Z: Use the gzip compression algorithm to compress the packaged files.
J: Use the BZIP2 compression algorithm to compress the packaged file.
3. Create, view, and extract archive files using the tar command
1) An example of using the TAR command to create an archive file:
Example: Use the TAR command to package the Arch directory as an archive file named Arch.tar (requires that all packaged files and directories be displayed):
Tar cvf Arch.tar Arch
Use the tar command to view an example of an archive file:
For example, use the TAR command to display a method that arch.tar all the files in this archive file (package):
Tar tf Arch.tar
2) Master the use of the tar command to extract an archive file using an example:
For example, use the tar command to restore the entire contents of Arch.tar:
Tar xvf arch.tar-c Path
4. File compression and decompression
1) Grasp the definition of compression: Compression is a large file through a number of compression algorithms into a small file.
2) Understand the purpose of compression: mainly to reduce the size of the file, which will save the disk or tape storage file space, and the transmission of these small files on the network will also reduce network browsing (that is, to save network bandwidth).
3) Mastering the definition of decompression: decompression is the way to restore a file that passes through some compression algorithms before it is compressed.
4) An example of the use of the gzip command and the Gunzip command:
A) For example: Compressed files File1 compressed into. gz format should use the command: gzip file1–c >/path/name.gz
b) For example: The command to extract the compressed file file1.gz is:
Gunzip file1.gz >
5) Use examples of mastering bzip2 commands and BUNZIP2 commands:
A) For example: Compress the file file1 into. bz2 format the command that should be used is: bzip2 file1 >
b) For example: The command to extract the compressed file file1.bz2 is:
BUNZIP2 file1.bz2
5. Compress and decompress while using the TAR command
1) Master the use of compression and decompression while using the TAR command example
A) For example, use the TAR command to package the Arch catalog and use gzip technology to compress the packaged file (the packaged file is named arch.tar.gz):
Tar Cvfz arch.tar.gz Arch
b) For example: Use the TAR command to package the Arch directory and use bzip2 technology to compress the packaged file method (the packaged file is named arch.tar.bz2): Tar cvfj arch.tar.bz2 Arch
6.vim Instructions for use
1) Vim working mode
2) Insert Command
3) Delete command
4) Search and Replace commands
5) Cursor Positioning
6) Save and exit
06-linux Basic Three