Basic Linux Learning (eight)

Source: Internet
Author: User

In this chapter, we learn about file archiving, compression, transmission, and network management.

# #文件的归档

1. File archiving is to turn multiple files into an archive file


TAR-C # #创建

-F # #指定归档文件名称

-T # #显示归档文件中的内容

-R # #向归档文件中添加文件

--get # #取出单个文件

--delete # #删除单个文件

-X # #取出归档文件中的所有内容

-C # #指定解档目录

-Z # #gz格式压缩

-J # #bz2格式压缩

-J # #xz格式压缩

From this we can see that the commonly used compression has three ways: gz,bz2,xz


2. Compression

Gz

Gzip Etc.tar # #压缩成gz格式

Gunzip etc.tar.gz # #解压gz格式压缩包

Tar file Etc.tar.gz/etc # #把文件归档为tar并压缩成gz文件

Tar file etc.tar.gz # #解压并解档gz格式压缩包


bz2

bzip2 Etc.tar # #压缩成bz2格式

BUNZIP2 etc.tar.bz2 # #解压bz2格式压缩包

Tar file etc.tar.bz2 # # archive files as tar and compress them into bz2 files

tar file etc.tar.bz2 # #解压并解档bz2格式压缩包


Xz

XZ Etc.tar # #压缩成xz格式

Unxz ETC.TAR.XZ # #解压xz格式压缩包

Tar file Etc.tar.xz/etc # #把文件归档为tar并压缩成xz文件

Tar file Etc.tar.xz # #解压并解档xz格式压缩包


# #系统中的文件传输

SCP file [email protected]:/dir # #上传

SCP [email Protected]:/dir/file/dir # #下载


rsync [parameter] file [email protected]:/dir

-R # #同步目录

-L # #不忽略连接

-P # #不忽略文件权限

-T # #不忽略文件时间戳

-G # #不忽略文件所有组

-O # #不忽略文件所有人

-D # #不忽略设备文件

SCP vs. Rsync, the rsync approach is much faster than the SCP approach


# #网络管理

Two ways to view network status: Ifconfig|ip addr Show

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/88/99/wKiom1f8ohqBU57RAAYv7ag8r9I512.png-wh_500x0-wm_3 -wmp_4-s_2554792102.png "title=" 10.png "alt=" Wkiom1f8ohqbu57raayv7ag8r9i512.png-wh_50 "/>


    1. IP Fundamentals

IPv4

172.25.0.10/255.255.255.0

172.25.0.10:ip Address

255.255.255.0: Subnet Mask

Subnet mask 255-bit corresponding IP bit for network bit

Subnet mask 0 corresponds to the IP bit master camera


2. Configure IP

"Graphic"

Graphical interface

Nm-connection-editor

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/88/99/wKiom1f8ocjx7ba3AADeHTtIJpE897.png-wh_500x0-wm_3 -wmp_4-s_1240214226.png "title=" 9.png "alt=" Wkiom1f8ocjx7ba3aadehttijpe897.png-wh_50 "/>

Text interface

Nmtui


Command

Ifconfig network card IP netmask # #临时设定


File

DHCP # #动态获取

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/88/99/wKiom1f8oXiChKgzAAHaShNHPCQ756.png-wh_500x0-wm_3 -wmp_4-s_177852586.png "title=" 8.png "alt=" Wkiom1f8oxichkgzaahashnhpcq756.png-wh_50 "/>

Need to restart Network service after Setup

Systemctl Restart Network

Basic Linux Learning (eight)

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.