mv - Move or rename file(s) on the remote server in SFTP

Using mv command you can move or rename a file in a remote server.

Syntax:
psftp> mv oldfile newfile


The mv command works exactly the same way as ren.

Example:
psftp> pwd
current remote working directory is /home/user1
psftp> mv file1.sh file2.sh


In the above code, the file1.sh is renamed/moved as file2.sh.
file1.sh will be no more after executing the above code.