Linux Learning--copy file

Source: Internet
Author: User
Tags symlink

1. local Copy File

CP [option] source file destination file

-A as far as possible file status, permissions and other information are reproduced as original.

-R If the source contains a directory name, the files under the directory are also copied to the destination.

-F If a destination already has a file with the same file name, it should be deleted before copying.

[email protected] test]$ CP HELLOWORLD.C. /[[email protected] test]$ CD. [Email protected] liyan]$ ls-lttotal 2000-rw-rw-r--1 syscom syscom     985 Jan 21:05 HELLOWORLD.C

2. Remote Copy File

SCP [email protected]: source file Destination file (remote Copy to local)

SCP source file [email protected]: Target file (local copy to remote)

3, Ftp/sftp

SFTP [email protected] (connect to remote host)

sftp> helpavailable Commands:bye quit SFTP (exit) CD Path change                    Remote directory to ' path ' chgrp GRP path Change group of file ' path ' to ' GRP ' chmod mode path Change permissions of the file ' path ' to ' mode ' chown own path change owner of the file ' path ' to ' ow n ' DF [-hi] [path] Display statistics for current directory or
FileSystem containing ' path ' (displays statistics for the current directory or file system containing ' path ') exit Quit Sftpget [-p] remote-path [Local-path] Download filehelp Display this help TEXTLCD P Ath change local directory to ' path ' lls [ls-options [path]] Display local directory L Istinglmkdir path Create local directoryln oldpath newpath Symlink remote FILELPWD Print Local working Directoryls [ -1aflnrst] [path] Display remote directory lis Tinglumask umask Set local umask to ' umask ' mkdir path Create remote Director Yprogress Toggle Display of Progress meterput [-P] local-path [Remote-path] Upload filepwd Display Remote working directoryquit Quit sftprename OldPath NEWP Ath Rename Remote filerm path Delete remote filermdir path Remove remote Directorys Ymlink oldpath newpath Symlink remote fileversion Show SFTP Version!command Execute ' command ' in local shell! Escape to local shell? Synonym for help

Linux Learning--copy file

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.