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.

psftp> mv oldfile newfile

The mv command works exactly the same way as ren.

psftp> pwd
current remote working directory is /home/user1
psftp> mv

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