Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Linux sftp 指令完整操作指南:連線、上傳下載、目錄切換、本地/遠端命令區分、圖形介面替代

編輯:Linux 教學

sftp 為加密互動式檔案傳輸程式,比 FTP 更安全。

連線

sftp user@host_or_ip
# 輸入密碼後進入 sftp> 提示符

若需遠端編輯檔案,改用 ssh user@host (sftp 即基於 ssh)。

核心檔案操作

# 下載遠端檔案到本地
get /remote/path/file /local/path/

# 上傳本地檔案到遠端
put /local/path/file /remote/path/

# 遠端目錄操作
pwd          # 顯示遠端當前路徑
cd /path     # 切換遠端目錄
ls/rm/rmdir/mkdir  # 遠端列表/刪除/建立目錄

# 本地目錄操作 (加 l 前綴)
lpwd         # 本地當前路徑
lcd /path    # 切換本地目錄
lls/lrm/lmkdir   # 本地列表/刪除/建立目錄

離開

exit / quit / bye

圖形介面替代

命令列不便可安裝 gftp:sudo apt-get install gftp。

Copyright © Windows教程網 All Rights Reserved