Copy file from windows to linux in commandline
In this article we will discuss on how to copy file from Linux to windows or vice versa using different tools. The discussion will be around using some GUI to copy the files and through CUI or command line to complete the same copy tasks.
From Unix to Unix:
For command line or CUI mode you can use scp commands as seen here
From Unix to Windows and vice versa:
Copying a file or folder from windows to Linux using command line can be done using a tool called pscp which has inline password option for authentication. This means you can use the same command inside a shell script or batch script and schedule a copy of files or folders time to time unattended. you can download pscp from here and here.
Example command to copy file from Linux to Windows with inline password :
Linux From DIR :/root/second/* Windows To DIR : C:/Users/joe.doe/Downloads (Forward slashes only) -pw : Password pscp -pw mysecretpassword [email protected]:/root/second/* C:/Users/joe.doe/Downloads
Example command to copy file from windows to Linux with inline password:
pscp -pw mysecretpassword C:\Users\Admin\Desktop\* [email protected]:/home/Admin/
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.