![Linux scp命令怎么使用_第1頁](http://file4.renrendoc.com/view/8b9510c07ff4153d4c72a03810a51714/8b9510c07ff4153d4c72a03810a517141.gif)
![Linux scp命令怎么使用_第2頁](http://file4.renrendoc.com/view/8b9510c07ff4153d4c72a03810a51714/8b9510c07ff4153d4c72a03810a517142.gif)
![Linux scp命令怎么使用_第3頁](http://file4.renrendoc.com/view/8b9510c07ff4153d4c72a03810a51714/8b9510c07ff4153d4c72a03810a517143.gif)
![Linux scp命令怎么使用_第4頁](http://file4.renrendoc.com/view/8b9510c07ff4153d4c72a03810a51714/8b9510c07ff4153d4c72a03810a517144.gif)
![Linux scp命令怎么使用_第5頁](http://file4.renrendoc.com/view/8b9510c07ff4153d4c72a03810a51714/8b9510c07ff4153d4c72a03810a517145.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、編號:時(shí)間:20XX年X月X日X X 文 案頁碼:第 頁Linux scp命令怎么使用 Linux下要實(shí)現(xiàn)兩臺(tái)服務(wù)器之間的文件傳送,使用scp命令就可以了,在Linux系統(tǒng)中,scp命令的用法簡單而又實(shí)用,下面是我辛苦為大家?guī)淼腖inux scp命令怎么使用,希望大家可以喜歡并分享出去。 Linux系統(tǒng)中scp命令的詳細(xì)解釋 篇一 1、命令格式: scp 參數(shù) 原路徑 目標(biāo)路徑 2、命令功能: scp是 secure copy的縮寫, scp是linux系統(tǒng)下基于ssh登陸進(jìn)行安全的遠(yuǎn)程文件拷貝命令。linux的scp命令可以在linux服務(wù)器之間復(fù)制文件和目錄。 Linux系統(tǒng)中scp命令
2、參數(shù)說明 篇二 1 強(qiáng)制scp命令使用協(xié)議ssh1 2 強(qiáng)制scp命令使用協(xié)議ssh2 4 強(qiáng)制scp命令只使用IPv4尋址 6 強(qiáng)制scp命令只使用IPv6尋址 B 使用批處理模式(傳輸過程中不詢問傳輸口令或短語) C 允許壓縮。(將C標(biāo)志傳遞給ssh,從而打開壓縮功能) p 保留原文件的修改時(shí)間,訪問時(shí)間和訪問權(quán)限。 q 不顯示傳輸進(jìn)度條。 r 遞歸復(fù)制整個(gè)目錄。 v 詳細(xì)方式顯示輸出。scp和ssh(1)會(huì)顯示出整個(gè)過程的調(diào)試信息。這些信息用于調(diào)試連接,驗(yàn)證和配置問題。 c cipher 以cipher將數(shù)據(jù)傳輸進(jìn)行加密,這個(gè)選項(xiàng)將直接傳遞給ssh。 F ssh_config 指定一個(gè)替
3、代的ssh配置文件,此參數(shù)直接傳遞給ssh。 i identity_file 從指定文件中讀取傳輸時(shí)使用的密鑰文件,此參數(shù)直接傳遞給ssh。 l limit 限定用戶所能使用的帶寬,以Kbit/s為單位。 o ssh_option 如果習(xí)慣于使用ssh_config(5)中的參數(shù)傳遞方式, P port 注意是大寫的P, port是指定數(shù)據(jù)傳輸用到的端口號 S program 指定加密傳輸時(shí)所使用的程序。此程序必須能夠理解ssh(1)的選項(xiàng)。 .使用實(shí)例: 篇三 scp命令的實(shí)際應(yīng)用概述: 從本地服務(wù)器復(fù)制到遠(yuǎn)程服務(wù)器: (1) 復(fù)制文件: 命令格式: 代碼如下: scp local_file
4、 a href=mailto:remote_usernameremote_ip:remote_folderremote_usernameremote_ip:remote_folder/a 或者 scp local_file a href=mailto:remote_usernameremote_ip:remote_fileremote_usernameremote_ip:remote_file/a 或者 scp local_file remote_ip:remote_folder 或者 scp local_file remote_ip:remote_file 第1,2個(gè)指定了用戶名,命令執(zhí)行后
5、需要輸入用戶密碼,第1個(gè)僅指定了遠(yuǎn)程的目錄,文件名字不變,第2個(gè)指定了文件名 第3,4個(gè)沒有指定用戶名,命令執(zhí)行后需要輸入用戶名和密碼,第3個(gè)僅指定了遠(yuǎn)程的目錄,文件名字不變,第4個(gè)指定了文件名 (2) 復(fù)制目錄: 命令格式: scp r local_folder remote_usernameremote_ip:remote_folder 或者 scp r local_folder remote_ip:remote_folder 第1個(gè)指定了用戶名,命令執(zhí)行后需要輸入用戶密碼; 第2個(gè)沒有指定用戶名,命令執(zhí)行后需要輸入用戶名和密碼; 從遠(yuǎn)程服務(wù)器復(fù)制到本地服務(wù)器: 從遠(yuǎn)程復(fù)制到本地的scp命
6、令與上面的命令雷同,只要將從本地復(fù)制到遠(yuǎn)程的命令后面2個(gè)參數(shù)互換順序就行了。 .命令功能: 篇四 scp是 secure copy的縮寫, scp是linux系統(tǒng)下基于ssh登陸進(jìn)行安全的遠(yuǎn)程文件拷貝命令。linux的scp命令可以在linux服務(wù)器之間復(fù)制文件和目錄。Linux系統(tǒng)中scp命令使用實(shí)例 篇五 scp命令的實(shí)際應(yīng)用概述: 從本地服務(wù)器復(fù)制到遠(yuǎn)程服務(wù)器: (1) 復(fù)制文件: 命令格式: 復(fù)制代碼代碼如下: scp local_file a href=mailto:remote_usernameremote_ip:remote_folderremote_usernameremote
7、_ip:remote_folder/a 或者 scp local_file a href=mailto:remote_usernameremote_ip:remote_fileremote_usernameremote_ip:remote_file/a 或者 scp local_file remote_ip:remote_folder 或者 scp local_file remote_ip:remote_file 第1,2個(gè)指定了用戶名,命令執(zhí)行后需要輸入用戶密碼,第1個(gè)僅指定了遠(yuǎn)程的目錄,文件名字不變,第2個(gè)指定了文件名 第3,4個(gè)沒有指定用戶名,命令執(zhí)行后需要輸入用戶名和密碼,第3個(gè)僅指定
8、了遠(yuǎn)程的目錄,文件名字不變,第4個(gè)指定了文件名 (2) 復(fù)制目錄: 命令格式: scp r local_folder remote_usernameremote_ip:remote_folder 或者 scp r local_folder remote_ip:remote_folder 第1個(gè)指定了用戶名,命令執(zhí)行后需要輸入用戶密碼; 第2個(gè)沒有指定用戶名,命令執(zhí)行后需要輸入用戶名和密碼; 從遠(yuǎn)程服務(wù)器復(fù)制到本地服務(wù)器: 從遠(yuǎn)程復(fù)制到本地的scp命令與上面的命令雷同,只要將從本地復(fù)制到遠(yuǎn)程的命令后面2個(gè)參數(shù)互換順序就行了。 實(shí)例1:從遠(yuǎn)處復(fù)制文件到本地目錄 命令:scp root192.168
9、.120.204:/opt/soft/nginx0.5.38.tar.gz /opt/soft/ 輸出: 復(fù)制代碼代碼如下: rootlocalhost # cd /opt/soft/ rootlocalhost soft# ll 總計(jì) 80072 drwxrxrx 12 root root 4096 0921 18:40 fms3.5 drwxrxrx 3 root root 4096 0921 17:58 fms4.5 drwxrxrx 10 root root 4096 1030 17:15 jdk1.6.0_16 drwxrxrx 10 root root 4096 0917 19:2
10、7 jdk1.6.0_16.bak rwxrxrx 1 root root 81871260 20221221 jdk6u16linuxx64.bin drwxrwxrwx 2 root root 4096 0921 01:16 mysql drwxrxrx 3 root root 4096 0921 18:40 setup_file drwxrxrx 9 root root 4096 0917 19:23 tomcat6.0.32 drwxrxrx 9 root root 4096 20220814 tomcat_7.0 rootlocalhost soft# scp a href=mail
11、to:root192.168.120.204:/opt/soft/nginx0.5.38.tar.gzroot192.168.120.204:/opt/soft/nginx0.5.38.tar.gz/a /opt/soft/ a href=mailto:root192.168.120.204sroot192.168.120.204s/a password: nginx0.5.38.tar.gz 100% 479KB 478.7KB/s 00:00 rootlocalhost soft# ll 總計(jì) 80556 drwxrxrx 12 root root 4096 0921 18:40 fms3
12、.5 drwxrxrx 3 root root 4096 0921 17:58 fms4.5 drwxrxrx 10 root root 4096 1030 17:15 jdk1.6.0_16 drwxrxrx 10 root root 4096 0917 19:27 jdk1.6.0_16.bak rwxrxrx 1 root root 81871260 20221221 jdk6u16linuxx64.bin drwxrwxrwx 2 root root 4096 0921 01:16 mysql rwrr 1 root root 490220 0315 09:11 nginx0.5.38
13、.tar.gz drwxrxrx 3 root root 4096 0921 18:40 setup_file drwxrxrx 9 root root 4096 0917 19:23 tomcat6.0.32 drwxrxrx 9 root root 4096 20220814 tomcat_7.0 rootlocalhost soft# 說明: 從192.168.120.204機(jī)器上的/opt/soft/的目錄中下載nginx0.5.38.tar.gz 文件到本地/opt/soft/目錄中 實(shí)例2:從遠(yuǎn)處復(fù)制到本地 命令:scp r root192.168.120.204:/opt/sof
14、t/mongodb /opt/soft/ 輸出: 復(fù)制代碼代碼如下: rootlocalhost soft# ll 總計(jì) 80556 drwxrxrx 12 root root 4096 0921 18:40 fms3.5 drwxrxrx 3 root root 4096 0921 17:58 fms4.5 drwxrxrx 10 root root 4096 1030 17:15 jdk1.6.0_16 drwxrxrx 10 root root 4096 0917 19:27 jdk1.6.0_16.bak rwxrxrx 1 root root 81871260 20221221 jd
15、k6u16linuxx64.bin drwxrwxrwx 2 root root 4096 0921 01:16 mysql rwrr 1 root root 490220 0315 09:11 nginx0.5.38.tar.gz drwxrxrx 3 root root 4096 0921 18:40 setup_file drwxrxrx 9 root root 4096 0917 19:23 tomcat6.0.32 drwxrxrx 9 root root 4096 20220814 tomcat_7.0 rootlocalhost soft# scp r a href=mailto
16、:root192.168.120.204:/opt/soft/mongodbroot192.168.120.204:/opt/soft/mongodb/a /opt/soft/ a href=mailto:root192.168.120.204sroot192.168.120.204s/a password: mongodblinuxi686static1.8.5.tgz 100% 28MB 28.3MB/s 00:01 README 100% 731 0.7KB/s 00:00 THIRDPARTYNOTICES 100% 7866 7.7KB/s 00:00 mongorestore 10
17、0% 7753KB 7.6MB/s 00:00 mongod 100% 7760KB 7.6MB/s 00:01 mongoexport 100% 7744KB 7.6MB/s 00:00 bsondump 100% 7737KB 7.6MB/s 00:00 mongofiles 100% 7748KB 7.6MB/s 00:01 mongostat 100% 7808KB 7.6MB/s 00:00 mongos 100% 5262KB 5.1MB/s 00:01 mongo 100% 3707KB 3.6MB/s 00:00 mongoimport 100% 7754KB 7.6MB/s
18、00:00 mongodump 100% 7773KB 7.6MB/s 00:00 GNUAGPL3.0 100% 34KB 33.7KB/s 00:00 rootlocalhost soft# ll 總計(jì) 80560 drwxrxrx 12 root root 4096 0921 18:40 fms3.5 drwxrxrx 3 root root 4096 0921 17:58 fms4.5 drwxrxrx 10 root root 4096 1030 17:15 jdk1.6.0_16 drwxrxrx 10 root root 4096 0917 19:27 jdk1.6.0_16.b
19、ak rwxrxrx 1 root root 81871260 20221221 jdk6u16linuxx64.bin drwxrxrx 3 root root 4096 0315 09:18 mongodb drwxrwxrwx 2 root root 4096 0921 01:16 mysql rwrr 1 root root 490220 0315 09:11 nginx0.5.38.tar.gz drwxrxrx 3 root root 4096 0921 18:40 setup_file drwxrxrx 9 root root 4096 0917 19:23 tomcat6.0.
20、32 drwxrxrx 9 root root 4096 20220814 tomcat_7.0 rootlocalhost soft# 說明:從192.168.120.204機(jī)器上的/opt/soft/中下載mongodb 目錄到本地的/opt/soft/目錄來。 實(shí)例3:上傳本地文件到遠(yuǎn)程機(jī)器指定目錄 命令:scp /opt/soft/nginx0.5.38.tar.gz root192.168.120.204:/opt/soft/scptest 輸出: 復(fù)制代碼代碼如下: 上傳前目標(biāo)機(jī)器的目標(biāo)目錄: rootlocalhost soft# cd scptest/ rootlocalhos
21、t scptest# ll 總計(jì) 0 rootlocalhost scptest# ll/p p本地機(jī)器上傳: rootlocalhost soft# scp /opt/soft/nginx0.5.38.tar.gz a href=mailto:root192.168.120.204:/opt/soft/scptestroot192.168.120.204:/opt/soft/scptest/a a href=mailto:root192.168.120.204sroot192.168.120.204s/a password: nginx0.5.38.tar.gz 100% 479KB 478
22、.7KB/s 00:00 rootlocalhost soft# /p p上傳后目標(biāo)機(jī)器的目標(biāo)目錄: rootlocalhost scptest# ll 總計(jì) 484 rwrr 1 root root 490220 0315 09:25 nginx0.5.38.tar.gz rootlocalhost scptest# 說明:復(fù)制本地opt/soft/目錄下的文件nginx0.5.38.tar.gz 到遠(yuǎn)程機(jī)器192.168.120.204的opt/soft/scptest目錄 實(shí)例4:上傳本地目錄到遠(yuǎn)程機(jī)器指定目錄 命令:scp r /opt/soft/mongodb root192.168
23、.120.204:/opt/soft/scptest 輸出: 復(fù)制代碼代碼如下: 上傳前目標(biāo)機(jī)器的目標(biāo)目錄: rootlocalhost # cd /opt/soft/scptest/ rootlocalhost scptest# ll 總計(jì) 484 rwrr 1 root root 490220 0315 09:25 nginx0.5.38.tar.gz rootlocalhost scptest# 本地機(jī)器上傳: rootlocalhost # scp r /opt/soft/mongodb a href=mailto:root192.168.120.204:/opt/soft/scptestroot192.168.120.204:/opt/soft/scptest/a a href=mailto:root192.168.120.204sroot192.168.120.204s/a password: mongodblinuxi686static1.8.5
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年四年級英語下冊 Unit 3 What can you see第2課時(shí)說課稿 湘少版
- 7《美麗的化學(xué)變化》說課稿-2023-2024學(xué)年科學(xué)六年級下冊教科版
- 2025計(jì)算機(jī)購銷合同樣書
- 2025勞動(dòng)合同法課程學(xué)習(xí)指南
- 2024年高中化學(xué) 專題3 常見的烴 第一單元 第1課時(shí) 脂肪烴的類別、烷烴說課稿 蘇教版選修5001
- 2憲法是根本法 第一課時(shí) 感受憲法日(說課稿)-部編版道德與法治六年級上冊
- 醫(yī)療試劑合同范例
- 包工項(xiàng)目合同范本
- 化妝店加盟合同范例
- 2024-2025學(xué)年高中地理 第二章 區(qū)域可持續(xù)發(fā)展 2.4 農(nóng)業(yè)的可持續(xù)發(fā)展-以美國為例說課稿 湘教版必修3
- 初中英語-Unit2 My dream job(writing)教學(xué)課件設(shè)計(jì)
- 供貨方案及時(shí)間計(jì)劃安排
- 唐山動(dòng)物園景觀規(guī)劃設(shè)計(jì)方案
- 中國版梅尼埃病診斷指南解讀
- 創(chuàng)業(yè)投資管理知到章節(jié)答案智慧樹2023年武漢科技大學(xué)
- 暨南大學(xué)《經(jīng)濟(jì)學(xué)》考博歷年真題詳解(宏觀經(jīng)濟(jì)學(xué)部分)
- GB/T 8014.1-2005鋁及鋁合金陽極氧化氧化膜厚度的測量方法第1部分:測量原則
- eNSP簡介及操作課件
- 運(yùn)動(dòng)技能學(xué)習(xí)與控制課件第七章運(yùn)動(dòng)技能的協(xié)調(diào)控制
- 節(jié)后復(fù)工吊籃驗(yàn)收表格
- 氣管套管滑脫急救知識分享
評論
0/150
提交評論