Linux Third Day

Source: Internet
Author: User
Tags delete key md5 md5 encryption

A text Processing command and the TAR command use the Cat command to merge files vertically

Vertical merge methods for both files:

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.

Tar command common options:

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.

Using the TAR command to create an archive file

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 archive file

Use the TAR command to display a method for Arch.tar all files in this archive (package):
Tar tf Arch.tar

An example of the use of the tar command to extract an archive file:
For example, use the tar command to restore the entire contents of Arch.tar:
Tar xvf arch.tar-c Path

File compression and decompression

Mastering the definition of compression: Compression is a large file through a number of compression algorithms into a small file.
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).
Mastering the definition of decompression: decompression is the way to restore a file that passes through some compression algorithms before it is compressed.
What is compression

Mastering the definition of compression: Compression is a large file through a number of compression algorithms into a small file.
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).
What is decompression

Mastering the definition of decompression: decompression is the way to restore a file that passes through some compression algorithms before it is compressed.
Purpose of compression

Compress and decompress while using the TAR command

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

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

Two use VI Editor to create and edit body files

1 Mastering the definition of vim: VIM is a standard body (text) editor embedded in UNIX and Linux systems, an interactive type body editor that can be used to create and modify body files.
2 Master the VI Editor in 3 Basic mode:
A) command-line mode: Vim's default mode. In this mode, all inputs are interpreted as VIM commands, which can be used to modify, copy, move, paste, and delete the body, as well as to move cursors, search strings, and exit VI operations.
b) Edit mode: In edit mode, the text can be entered in a previous file. In this mode, each character entered is interpreted by the VIM editor as the input body. Use the ESC key to return to the command-line mode.
c) Extended mode: Also called the last line mode on some UNIX systems. In this mode, you can use some advanced editing commands, such as searching and replacing strings, saving or exiting the Vim editor, and so on. To enter the last line mode, you need to enter a colon (:) in the command line mode, and the colon will move the cursor to the last line of the screen.

4. Enter insert mode
Insert Mode command:
A: Enter insert mode and add after the cursor.
I: Enter the insert mode and insert it before the cursor.
O: Enter insert mode and open a new line below the current (cursor) line.

5. Delete and copy operations in command-line mode
1) master commonly used buttons for deleting and copying

6. Paste command

1) Master the Paste command:

7. Undo and Redo Commands

1) master the commonly used undo and redo Commands:

8. Storage and exit of extended mode and files

1) Master commands commonly used in extended mode:

9. Quickly move the position of the cursor in the file

1) command to quickly move the position of the cursor in the file

10. Quickly move the position of the cursor in the screen

1) command to quickly navigate the position of the cursor in the screen

Initialization and service of three systems

1. Boot Order of Linux systems
1) Mastering the Order of Linux system boot: (see attached 1)

The BIOS's work is to check the computer's hardware devices, such as CPU, memory, and fan speed, etc.
the MBR will be in the 1th block of the boot disk with a size of 512B. The first 446 of the program code is used to select the boot partition (partition), that is, which partition to install the power-on code;
in the kernel part is the driver of the computer device so that the operating system can control the device on the computer. And a read-only mount/(root) file system, that is, the operating system can only read to the root file system (directory) of the partition; the
Init program has a process ID of 1, which is the 1th program executed by the Linux operating system.
1.BOIS Initialization and bootloader
1) Master the definition of BIOS: BIOS (Basic input/output System) (abbreviated for the base input/output systems), which is the interface between hardware and software, and is a very basic interface.
2.GRUB programs and grub.conf files
1) Master the definition of grub: GRUB is the abbreviation for the Grand Unified Bootloader (multiple OS boot manager).
2) Master grub configuration file: grub.conf
Set Grub MD5 encryption command Grub-md5-crypt
Password = plaintext or Password--md5 ciphertext (edit the password for the Grub configuration file)
Title Red Hat Header
Password = plaintext or Password--md5 ciphertext (password to load kernel system boot required)
3. Initialization of the kernel and initialization of INIT (see Linux System Management P322)
1) Master Init's configuration file:/etc/inittab 
2) understand what the INIT program does:
a) Decide which run levels (the default) to use for the preset (run level).  
B) performs some system initialization scripts (programs) to initialize the operating system.
C) Execute the program in the corresponding directory according to the settings of the run level to determine which services to start.
D) To set some key combinations.
e) Defines the UPS uninterruptible power system, which is the program to be executed when there is a problem with the supply or when the power is restored.  
F) produces 6 virtual consoles, or tty1~tty6.
4.run levels (runlevel)
1) Master all operational levels and the functions corresponding to each runlevel:

5. Shutting down the system and rebooting the system
1) Master the commonly used commands to shut down the system:
Shutdown-h now
Halt
Poweroff
Init 0
2) Master the commonly used commands to restart the system:
Shutdown-r now
Reboot
Init 6
Ctrl+alt+delete Key
6. Master single-user mode to modify the user's password
7. Master Rescue Mode

Linux Third Day

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.