How to rename file on the server using secure copy(SCP)?

0
13585
How to rename a file in server using SCP
Rename File On the Server Using SCP.

Secure copy-SCP

SCP or Secure copy is a securely transferring computer files in the following ways

  • from your local machine to a remote machine,
  • from a remote machine to your local machine,
  • between two remote machines.

It uses the same authentication and security as the Secure Shell (SSH) protocol from which it is based. SCP is loved for its simplicity, security and pre-installed availability.

Step 1:

If you want to view the filename

scp  filename host:

Step 2:

If your username on the remote system is different from your username on the system you are currently using, the command.

scp filename username@host

Step 3:

Other than home directory, If you want to copy a file to a directory on the remote system, you need to add a path after the ‘:‘ colon that follows the hostname:

scp filename username@host:/path/to/other/destination/directory

The command to renaming a file on the server:

scp filename username@remote.host.net.:filenewname

To copy files from one host to another, use the following syntax:

scp [[user@]host1:]file1 ... [[user@]host2:]file2

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here