Linux compression decompression, vi editing, hard disk partitioning, soft connection and hard connection

Source: Internet
Author: User
Tags unpack

One:

1) Merge user information database files and group information database files vertically into one file/1.txt (overwrite)

2) Merge user information database files and user password database files vertically into one file/2.txt (append)

3) Package The/1.txt,/2.txt two files as a/1.tar

4) Use the gzip command to compress the 1.txt file named 1.txt.gz

5) Decompression 1.txt.gz

6) file name 1.txt.bz2 after compressing 1.txt compression with bzip2

7) Decompression 1.txt.bz2

8) Unpack 1.tar, unpack the file and store it in the/tmp directory

9) Use the TAR command to package and compress/1.txt,/2.txt, and get the file name 1.tar.gz

10) Unpack the 1.tar.gz, unpack the file and store it in the/tmp directory

Two:
1) Edit the file using the VI editor/1.txt Enter the edit mode to write the content "Hello World"

VI 1.txt


2) go to command line mode to copy the row content, paste 80 lines below

Yy

80p


3) quickly move the cursor to the last line of the file

# $
4) quickly move the cursor to the middle line of the current screen

#M
5) quickly move the cursor to the fifth line of the file

#5g
6) Insert a new line below "Welcome to Beijing"


7) Delete the row you just inserted

#dd


8) Undo the previous step

#u
9) Enter the extended mode to perform the File Save exit operation

#:wq

Three:
1) Add a 20G SCSI hard disk before opening the Linux system


2) Turn on the system, right click on the desktop, open the terminal
3) for the newly added hard disk partition, a primary partition size of 10G, the remaining space to the extended partition, on the extended partition divided two logical partitions, the size of each 5G


4) format primary partition as EXT3 system
5) format two logical partitions for EXT4 system

Four:
1) Set up the/etc/passwd soft connection file, and put it in the/tmp directory


2) Establish/etc/passwd hard link file, put in/boot, if not successful, thinking is why

A hard link connects to an inode block and cannot be linked across regions.
3) View the newly created soft connection, the inode of the source file and the destination file


4) View the hard connection just established, the inode of the source file and the target file

Linux compression decompression, vi editing, hard disk partitioning, soft connection and hard connection

Related Article

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.