您的位置:首页 > 编程语言 > PHP开发

sftp上传文件能用到的简单命令

2015-07-13 16:44 579 查看
使用SecureCRT远程登陆服务器。

1.打开SFTP : 快捷方式 Alt + P 打开SFTP 或者 直接打开

2.常用命令:

open [user@]host[:port] Connect to remote host

get [-r][-a | -b] remote-path Download file

-r downloads directory recursively

force ascii (-a) or binary (-b) mode

(get--下载文件)

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(显示本地pc机文件存储路径)


quit Quit sftp

例如:

# cd /root

# dir

hosts

/root中有hosts这个文件。

sftp> get hosts

Downloading hosts from /root/hosts

100% 194 bytes 194 bytes/s 00:00:00

/root/hosts: 194 bytes transferred in 0 seconds (194 bytes/s)

在到本地pc机上可以看到刚才下载的hosts文件。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: