Available commands:
ascii Set transfer mode to ASCII binary Set transfer mode to binary cd path Change remote directory to 'path' lcd path Change local directory to 'path' detail remote-path Display system information about remote file or folder ldetail local-path Display system information about local file or folder chgrp group path Change group of file 'path' to 'group' chmod mode path Change permissions of file 'path' to 'mode' chown owner path Change owner of file 'path' to 'owner' exit Quit sftp help Display this help text include filename Include commands from 'filename' Alternate: < filename get [-r][-a | -b] remote-path Download file -r downloads directory recursively force ascii (-a) or binary (-b) mode ln [-s] existingpath linkpath Hardlink / symlink remote file ls [options] [path] Display remote directory listing lls [options] [path] Display local directory listing mkdir path Create remote directory lmkdir path Create local directory mv oldpath newpath Move remote file lmv oldpath newpath Move local file open [user@]host[:port] Connect to remote host put [-r][-a | -b] local-path Upload file -r uploads directory recursively force ascii (-a) or binary (-b) mode pwd Display remote working directory lpwd Print local working directory quit Quit sftp rename oldname newname Rename remote file lrename oldname newname Rename local file rmdir path Remove remote directory lrmdir path Remove local directory rm path Delete remote file lrm path Delete local file su username Substitutes the current user This is only supported with VShell for Windows 3.5 or later. type [transfer-mode] Display or set file transfer mode view remote-path Download and open file version Display protocol version
可用命令:
cd 路徑 更改遠程目錄到“路徑” lcd 路徑 更改本地目錄到“路徑” chgrp group path 將文件“path”的組更改為“group” chmod mode path 將文件“path”的權限更改為“mode” chown owner path 將文件“path”的屬主更改為“owner” exit 退出 sftp help 顯示這個幫助文本 get 遠程路徑 下載文件 ln existingpath linkpath 符號鏈接遠程文件 ls [選項] [路徑] 顯示遠程目錄列表 lls [選項] [路徑] 顯示本地目錄列表 mkdir 路徑 創建遠程目錄 lmkdir 路徑 創建本地目錄 mv oldpath newpath 移動遠程文件 open [用戶@]主機[:端口] 連接到遠程主機 put 本地路徑 上傳文件 pwd 顯示遠程工作目錄 lpwd 打印本地工作目錄 quit 退出 sftp rmdir 路徑 移除遠程目錄 lrmdir 路徑 移除本地目錄 rm 路徑 刪除遠程文件 lrm 路徑 刪除本地文件 symlink existingpath linkpath 符號鏈接遠程文件 version 顯示協議版本
回車提示輸入密碼。進入提示符sftp如果登陸遠程機器不是為了上傳下載文件,而是要修改遠程主機上的某些文件。可以ssh [email protected] (其實sftp就是ssh 的一個程式。)sftp get /var/www/fuyatao/index.php /home/fuyatao/這條語句將從遠程主機的 /var/www/fuyatao/目錄下將 index.php 下載到本地 /home/fuyatao/目錄下。sftp put /home/fuyatao/downloads/Linuxgl.pdf /var/www/fuyatao/這條語句將把本地 /home/fuyatao/downloads/目錄下的 linuxgl.pdf文件上傳至遠程主機/var/www/fuyatao/ 目錄下。改變路徑可以用cd ,改變本機路徑可以用 lcd;ls rm rmdir mkdir 這些命令都可以使用。同理調用本機都是加 l , 即 lls lrm.要離開sftp,用exit 或quit、 bye 均可。詳細情況可以查閱 man sftp.如果覺得在命令行模式下不太方便,可以 sudo apt-get install gftp。在圖形界面下操作就簡便多了。
你這樣的命令,應該是把文件名改為C了吧