當然,windows與linux之間文件的傳輸的兩種方式有很多,這里就僅僅列出工作中遇到的,作為筆記;
方法一:安裝SSH Secure Shell Client客戶端
安裝即可登錄直接拖拉到linux,如果從linux下導出文件則需要如此操作
文件自動回到windows窗口的當前目錄;
方法2:通過windows cmd窗口命令
Microsoft Windows XP [版本 5.1.2600]
(C) 版權所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>d:
D:\>e:
step1:ftp登錄
E:\>ftp 128.8.28.212
Connected to 128.8.28.212.
220 (vsFTPd 2.2.2)
User (128.8.28.212:(none)): oracle
331 Please specify the password.
Password:
230 Login successful.
step2:查看目錄中的文件列表
ftp> cd wangxj
250 Directory successfully changed.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
enfo_ods.dmp
enfo_ods.log
tsubject.dmp
tsubject.log
226 Directory send OK.
ftp: 收到 56 字節,用時 0.00Seconds 56000.00Kbytes
step3:從linux當前目錄下載文
ftp> get enfo_ods.dmp200 PORT command successful. Consider using PASV150 Opening BINARY mode data connection for enfo_ods.dmp (325029888 bytes)226 Transfer complete.ftp: 收到 325029888 字節,用時 27.39Seconds 11866.74Kbytes/sec.
ftp> get enfo_ods.log
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for enfo_ods.log (13704 bytes).
226 Transfer complete.
ftp: 收到 13704 字節,用時 0.00Seconds 13704000.00Kbytes/sec.
step4:從windows上傳文件到linux
ftp> put test.ktr;
test.ktr;: File not found
//退出ftp 或者用bye
ftp> quit
E:\>ftp 128.8.28.212
Connected to 128.8.28.212.
220 (vsFTPd 2.2.2)
User (128.8.28.212:(none)): oracle
331 Please specify the password.
Password:
230 Login successful.
ftp> put E:\test.ktr
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 Transfer complete.
ftp: 發送 23410 字節,用時 0.00Seconds 23410000.00Kbytes/sec.
ftp>
備注:
ftp是通用協議,不區分系統的。
知道linux機器的IP即可。
開始 -> 運行,輸入cmd並回車,鍵入以下命令(前面的>為命令提示符,不用輸入):
> ftp Linux機器的IP地址
> binary
> put windows系統本地文件全路徑 /linux系統上的目標路徑
> bye
其中,如果是文本文件,可以不用binary設置為二進制傳輸模式(默認文本模式,會自動轉換文本格式)。如果是非文本文件(例如可執行文件),建議一定要設置為 binary 模式。