linux scp命令的用法

2021-08-19 21:29:18 字數 974 閱讀 2699

本地複製到遠端:

複製檔案:

複製到遠端某乙個目錄下:

scp local_file remote_username@remote_host:remote_dir/
複製到遠端某一目錄下並指定檔名:

scp local_file remote_username@remote_host:remote_dir/new_file_name
複製目錄:

複製到遠端某乙個目錄下:

scp -r local_dir remote_username@remote_host:remote_dir/
複製到遠端某乙個目錄下並指定新目錄名:

scp -r local_dir remote_username@remote_host:remote_dir_parent/new_dir_name

遠端複製到本地:

複製檔案:

從遠端複製到本地目錄下

scp remote_username@remote_host:remote_file local_dir/
從遠端複製到本地目錄下,指定檔名

scp remote_username@remote_host:remote_file local_dir/local_file
複製目錄:

從遠端複製到本地目錄下

scp -r remote_username@remote_host:remote_dir local_dir/
從遠端複製到本地目錄下,指定新目錄名:

scp -r remote_username@remote_host:remote_dir local_dir_parent/new_dir_name

linux scp命令的用法詳解

scp是linux中功能最強大的檔案傳輸命令,可以實現從本地到遠端以及遠端到本地的輕鬆檔案傳輸操作 svn 刪除所有的 svn檔案 find name svn type d exec rm fr 名稱 cp 使用許可權 所有使用者 使用方式 cp options source dest cp opt...

Linux scp命令的應用

linux scp命令用於linux之間複製檔案和目錄,具體如何使用這裡好好介紹一下,從本地複製到遠端 從遠端複製到本地是兩種使用方式。這裡有具體舉例 linux scp 命令 scp 可以在 2個 linux 主機間複製檔案 命令基本格式 scp 可選引數 file source file tar...

筆記 Linux SCP命令

名稱 cp 使用許可權 所有使用者 使用方式 cp options source dest cp options source.directory 說明 將乙個檔案拷貝至另一檔案,或將數個檔案拷貝至另一目錄。把計 a 盡可能將檔案狀態 許可權等資料都照原狀予以複製。r 若 source 中含有目錄名...