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

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

Syntax:
psftp> ren oldfile newfile


The ren command works exactly the same way as mv.

Example:
psftp> pwd
current remote working directory is /home/user1
psftp> ren 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.