SFTP (Secure File Transfer Protocol) is the safest file transfer protocol used to access, manage, and transfer files over an entirely secured SSH network.
Some of the common used SFTP commands are:
  • You can see your present remote working directory with the help of the pwd command.
sftp> pwd
  • Use the lpwd command to view the local present working directory.
sftp> lpwd
  •  Use the ls command to see the list of files & directories present inside the remote SFTP.
sftp> ls home/user/path
  •  Use the lls command to see the list of files & directories present inside the local server.
sftp> lls home/user/path
  • To browse through the directories, you can use the cd command.
sftp> cd home/user/path
  • Use the lcd command to change the present working directory of your local server.
sftp> lcd home/user/path
Some other useful SFTP commands.
  • To get the information about the remote server :
sftp> df
  • To change the file permission of a file on the remote server :
sftp> chmod 644 filename.php
  • To create a new directory on the remote server :
sftp> mkdir directory_name
  • To delete a file on the remote server :
sftp> rm filename.php
  • To rename a file on the remote server :
sftp> rename filaname.php new_filename.php
  • To delete an empty directory on the remote server :
sftp> rmdir directory_name
To learn more about SFTP and its commands, check this blog.
Was this answer helpful? 0 Users Found This Useful (0 Votes)