關于如何在Linux與linux,以及linux與windows之前傳輸檔案,如下
sftp:/home/test> help
bye finish your SFTP session
cd change your remote working directory
clear clear screen
exit finish your SFTP session
explore explore your local directory
get download a file from the server to your local machine
help give help
lcd change and/or print local working directory
lls list contents of a local directory
lpwd print your local working directory
ls list contents of a remote directory
mkdir create a directory on the remote server
mv move or rename a file on the remote server
put upload a file from your local machine to the server
pwd print your remote working directory
quit finish your SFTP session
rename move or rename a file on the remote server
rm delete a file
rmdir remove a directory on the remote server
sftp:/home/test>
這裡主要是介紹windows與linux檔案傳輸,其中比較常用的指令如下:
1、get
從遠端伺服器上下載下傳一個檔案存放到本地,如下:
先通過lcd切換到本地那個目錄下,然後通過get file
>> lcd d:\ //表示切換到本地的d盤下
>> get ./test.sql //這樣就将目前檔案下載下傳本地的d盤下
2、put
是将本地的檔案上傳到遠端伺服器上,如下:
>> put //在windows下彈出選擇檔案的視窗
3、lcd
先通過lcd切換到本地那個目錄下
4、lls
顯示目前目錄下的所有檔案
5、pwd