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