Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

File transfer of linux files from different systems

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1. File filing

(1)

Document archiving is to turn multiple documents into an archive file.

(2)

Tar c creation

F specify archive file name t display the contents of the archive file r add a file to the archive file-get take out a single file-delete delete a single file

X take out all the contents of the archive file

-C specifies the file directory

-z gz format compression

-j bz2 format compression

-J xz format compression

two。 Compress

Gz

Gzip etc.tar is compressed into gz format

Gunzip etc.tar.gz decompresses the gz format package

Tar zcf etc.tar.gz / etc files are archived as tar and compressed into gz

Tar zxf etc.tar.gz unzips and unfiles the gz format package

Bz2

Bzip2 etc.tar is compressed into bz2 format

Bunzip2 etc.tar.bz2 decompresses the bz2 format package

Tar jcf etc.tar.bz2 / etc files are archived as tar and compressed into bz2

Tar jxf etc.tar.bz2 unzips and unfiles the bz2 format package

Xz

Xz etc.tar is compressed into xz format

Unxz etc.tar.xz decompresses the xz format package

Tar Jcf etc.tar.xz / etc files are archived as tar and compressed into zx

Tar Jxf etc.tar.xz unzips and unfiles the xz format package

Zip

Zip-r etc.tar.zip etc.tar is compressed into zip format

Unzip etc.tar.zip decompresses the zip format package

3. File transfer in the system

Scp file username@ip:/dir upload

Download scp username@ip:/dir/file / dir

Rsync [parameters] file username@ip:/dir

Rsync-r synchronization directory

Compare with scp:

The reason is that scp is copied: if the mas2 file does not exist, it will be created, if it exists, it will be overwritten, and if it is on the mas2 but not on the Dashboard host, it will not be changed. It can be understood that scp means "copy". On the other hand, rsync compares the two files when they exist on the two hosts. If they are the same, they will do nothing and update them directly if there are differences.

To put it simply, rsync only updates the difference files.

-l do not ignore links

-p does not ignore file permissions

-t do not ignore the file timestamp

-g do not ignore all groups of files

-O ignore the owner of the file

-D does not ignore device files

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report