linux:-tips for copying or transferring files

Source: Internet
Author: User

<---Copy directory how do I exclude files? Common command CP, usage low--->

TAR-CF-./*--exclude= "nohup.out" | (cd/opt/&& tar-xf-) rsync--exclude= "Nohup.out"

<---CP multiple copies can be replaced with a command-line keyword, exclamation point! Represents the previous command, 2 represents the upper command--->

\CP-RFP Loggerserver/data/server/loggerserver_acc!:gs/loggerserver/nameserver/!-2:gs/loggerserver/sessionserver /

<---Tar with NC can do two machine data transmission, NC If you need to continue to connect with the option-K--->

TAR-CF-./*--exclude= "nohup.out" | Nc-l 13100NC 13100 | TAR-XF-

<---Another way to send data by port, a machine runs the above command, B machine runs the following command--->

Python-m Simplehttpserver 13100wget-c http://${ip}/file.tar.gz

@@ 扩展 Usage: a script written by the central machine does not want to be pushed out of execution can borrow the above port

Bash < (curl-s

This article is from the "Ithandonglin" blog, make sure to keep this source

linux:-tips for copying or transferring files

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: 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.