The usage of sftp under the SecureCRT tool, transfer folders from windows to centos

Now you need to upload static resources to the centos server, use the rz command:
insert image description here
here is a single file, there is no way to upload it to a folder.
In addition, I try to right-click to copy the folder, paste it in the centos window in vmware, or drag the file directly Clipped to the centos window, all led to the blue screen of the machine. . . .

Right-click on the secureCRT label to open an SFTP session:
Take the example of uploading D:\test under Windows to /nginx/html/ under Linux:

# 第一步:修改远端目录
sftp> cd nginx/html/
# 第二步:上传本地文件夹到指定目录中
sftp> put -r D:\test

It can be seen that every file is being uploaded:
insert image description here
uploaded successfully:
insert image description here
with sftp related commands:

cd path:切换远端目录

lcd path:切换本地路径

exit :退出sftp

get :下载文件到本地

ls:查看远端目录列表

lls:查看本地目录列表

mkdir path:新建远端目录

lmkdir path:新建本地目录

mv oldpath newpath:远端文件移动

lmv oldpath newpath:本地文件移动

put:上传文件到远端

pwd:查看远端工作目录

lpwd:查看本地工作目录

quit :退出sftp

rename oldname newname:远端文件重命名

lrename oldname newname:本地文件重命名

rm path:删除远端文件

lrm path:删除本地文件

rmdir path:删除远端目录

lrmdir path:删除本地目录

Reference link: SecureCRT - SFTP file transfer

Guess you like

Origin blog.csdn.net/weixin_42260782/article/details/130021086