Working with SFTP files

About SFTP file operations

After you establish a connection to an SFTP server, you can operate files on the SFTP server.

Changing the name of a file on the SFTP server

  1. Enter SFTP client view.

    For more information, see "Establishing a connection to an SFTP server."

  2. Change the name of a file on the SFTP server.

    rename old-name new-name

Downloading a file from the SFTP server and save it locally

  1. Enter SFTP client view.

    For more information, see "Establishing a connection to an SFTP server."

  2. Download a file from the SFTP server and save it locally.

    get remote-file [ local-file ]

Uploading a local file to the SFTP server

  1. Enter SFTP client view.

    For more information, see "Establishing a connection to an SFTP server."

  2. Upload a local file to the SFTP server.

    put local-file [ remote-file ]

Display files under a directory

  1. Enter SFTP client view.

    For more information, see "Establishing a connection to an SFTP server."

  2. Display files under a directory.

    • dir [ -a | -l ] [ remote-path ]

    • ls [ -a | -l ] [ remote-path ]

    The dir command has the same function as the ls command.

Deleting a file from the SFTP server

  1. Enter SFTP client view.

    For more information, see "Establishing a connection to an SFTP server."

  2. Delete a file from the SFTP server.

    • delete remote-file

    • remove remote-file

    The delete command has the same function as the remove command.