linux 常用命令 dig scp

來源:互聯網
上載者:User

標籤:linux   server   項目   資訊   

dig

dig [option] FQDN [@server]

@server :如果不以 /etc/resolv.conf 的設定來作為 DNS 查詢,可在此填入其他的 IP

options:相關的參數很多,主要有 +trace, -t type 以及 -x 三者最常用

+trace :就是從 . 開始追蹤,在 19.1.2 裡面談過了!回頭瞧瞧去!

-t type:查詢的資料主要有 mx, ns, soa 等類型

-x :查詢反解資訊,非常重要的項目!

 

1 使用預設值查詢 centos.daphne.com

650) this.width=650;" title="123[7]" style="border-left- 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px" border="0" alt="123[7]" src="http://img1.51cto.com/attachment/201405/24/158322_1400891027i4IC.jpg" width="910" height="525" />

 

2 查詢daphne.com的SOA記錄

650) this.width=650;" title="123[9]" style="border-left- 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px" border="0" alt="123[9]" src="http://img1.51cto.com/attachment/201405/24/158322_1400891030MjiQ.jpg" width="910" height="563" />

3 查詢192.168.200.129的反解記錄

650) this.width=650;" title="123[11]" style="border-left- 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px" border="0" alt="123[11]" src="http://img1.51cto.com/attachment/201405/24/158322_1400891032USqo.jpg" width="910" height="563" />

 

scp

scp [選擇性參數] file_source file_target

從本地 複製到 遠程

                                scp local_file [email protected]_ip:remote_folder

                                [email protected]_ip:remote_file

                                scp local_file remote_ip:remote_folder

                                scp local_file remote_ip:remote_file

                                第1,2 指定了使用者名稱,命令執行後需要輸入密碼,第1 僅指定遠程目錄,檔案名稱不變,第2 指定了檔案名稱

                                第3,4 沒有指定使用者名稱,命令執行後需要輸入使用者名稱,密碼

                                scp  /etc/inittab    [email protected]:/root

                                scp  /etc/inittab    [email protected]:/root/inittab.bak

 

從遠程 複製到 本地

前後2個參數 調換順序 即可

 

option

-r   複製目錄

-v 顯示進度

-p  指定連接埠

 

注意遠端使用者是否具有讀取遠程伺服器的相應檔案的許可權

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.