Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename a file with sftp get command

Is there a way to use a "get" command in sftp to get a folder without obtaining "Cannot download non-regular file:..../dir_name" or to get a file and save it with another name?

In the second option I mean:

sftp> ls
hello.txt
sftp> get hello.txt (+ something) byebye.txt
sftp> exit

And in my directory I have byebye.txt.

like image 522
Lucia Belardinelli Avatar asked Mar 07 '12 14:03

Lucia Belardinelli


1 Answers

no need any params, just

sftp> get hello.txt byebye.txt
like image 87
kuzditomi Avatar answered Nov 15 '22 06:11

kuzditomi