SCP Command in UNIX to Move Copy Files in UNIX

4 min read
0
0
397

SCP Command in UNIX | winscp file transfer | copy files in unix – If you want to transfer file from winscp, we can move those file manually by downloading to local and we can transfer those file anywhere. In Automation it’s not possible to transfer a file manually and if you do like that it’s not automation. In that case this following tutorial helps you to transfer a file from winscp to local and move winscp file from to another winscp directory.

How to Download file from winscp to local using SCP Command in UNIX

By using scp command its very easy to transfer or copy or move file from winscp (unix Location) to local Windows Machines, As well as one folder in to another folder in unix winscp.

SCP – Secure Copy Program

SCP command Syntax

scp [Optional command] [[User@]From_Host.com:]Source_File_path [User@]To_Host.com:][Destination_File_path]

SCP Command in UNIX Explanation

  • User-> User Name of the server (From_Server or To_Server)
  • From_Host.com-> Server address of Source file
  • Source_File_path -> Full Path of the file (Eg/- /data/folder/atecguide.txt)
  • To_Host.com-> Destination Path of the directory (Eg/- /data/folder)

SCP Command in Unix with Example

Copy / Move files between UNIX server samplscp.txt from atechguideserver1.com to atechguideserver2.com


scp username@atechguidecomserver1.com:/data/temp/samplescp.txt username@atechguidecomserver2.com:/data/dir/tech

Download or Copy Files in UNIX server using Scp command


scp user_name@servername_ipaddr:/home/user/techguide.txt /Users/atechguide/Desktop

Note: There is a space between path of directory\ source file and destination directory

Moves file samplscp.txt from Local to /data/tmp/mydir


scp samplscp.txt user@myserver.com:/data/tmp/mydir
  • Download a Directory from UNIX to Windows.
  • To download a full directory from winscp remote directory to local folder

scp -r Directory_name user_name@servername:/data/tmp/

Like these you can use SCP command in so many ways. Some of those things are.

  • Download a file from Winscp to local.
  • Import/Move a file from local to Winscp.
  • Move a file from one remote directory to another directory in same server.
  • Move a file from one remote directory to another directory in different server.
  • Download all file from a winscp directory to local

In my next post I will share how to automate the SCP command with use of Plink and QTP.

Load More Related Articles
Load More By Krishna Veni
Load More In General

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also

10 Websites for Students to Earn Money Online

Online earning is one of the most popular trends these days to earn money. Basically, the …