I'm facing a nightmare at work. A colleague responsible for what I'm going to describe below handed this responsibility to me and has now left the organization. I have no experience doing any of this stuff. Please excuse my lack of knowledge and long question-I'm not sure what info to include/leave out. Show
BackgroundWe procure some data from a third party, which is sent to a postgres server and then brought into a linux server where some shell scripts do some transformations. The dataset is then combined, after which it is sent to a data analysis tool we use. The process is automated using cron. However, every year, we need to manually update some metadata csv files on the linux server [these are combined with the 3rd party data using a shell script]. Folder structure:Below is what the linux server folder structure looks like [accessed using PuTTY]:
~/my_project>
~/meta_files>
What I need to doWhat I need to do is add a file called 2022.csv to the meta_files folder. I have the file on my local system. In my colleague's handover document, he simply says to "copy the file to linux using samba share". I've found the samba share location and set it up on my windows explorer. It has an address that looks like this: \\smb.comp.com\prod. There are various sorts of folders in here. I suspect that I've got to place the 2022.csv file somewhere in the samba share and then run a command on the linux server using PuTTY. However, I've no idea where to put it and what command to run. I apologize again for such a long question and the excessive description. Any help with how I can get the 2022.csv file onto linux would be greatly appreciated. Please let me know if any other info is required. Many thanks. Are you looking for a way to quickly transfer files from your Windows computer to your Linux computer and back again? The open source PSCP utility makes it easy to transfer files and folders, and of course it's open source. Setting your PATH in WindowsKnowing how to set your command path in Windows makes it easier to use a handy utility like PSCP. If you're unfamiliar with that process, read how to set a PATH on Windows. Using PSCPPSCP (PuTTY Secure Copy Protocol) is a command-line tool for transferring files and folders from a Windows computer to a Linux computer.
IP addressBefore you can make the transfer, you must know the IP address or fully-qualified domain name of the destination computer. Assuming it's a computer on your same network, and that you're not running a DNS server to resolve computer names, you can find the destination IP address using the
In all cases, 127.0.0.1 is a loopback address that the computer uses only to talk to itself, so in this example the correct address is 192.168.1.23. On your system, the IP address is likely to be different. If you're not sure which is which, you can try each one in succession until you get the right one (and then write it down somewhere!) Alternately, you can look in the settings of your router, which lists all addresses assigned over DHCP. Firewalls and serversThe If you're not sure whether your Linux machine is running SSH, then run this command on the Linux machine:
To ensure your firewall allows SSH traffic, run this command:
For more information on firewalls on Linux, read Make Linux stronger with firewalls. Transfer the fileIn
this example, I have a file called Now that you have the PS> dir %USERPROFILE%\Documents\ Now execute the transfer:
Here's the syntax, word for word:
After you authenticate to the Linux computer, the [ Related read Share files between Linux and Windows computers ] Verifying the transferredOn your Linux computer, open a terminal and use the
Copying a file off of a Linux systemYou aren't limited to just copying files to your Linux system. With
Here's the syntax:
Open your file manager to verify that the Image by: (Paul Laubscher, CC BY-SA 4.0) Remote copyingWith the power of the open source This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. How to upload file to Linux server using PuTTY?How to Upload Files. Create your custom index. html folder and have it ready to be uploaded to your public_html folder.. Type: >pscp source_filename userid@server_name:/path_destination_filename. ... . After you are done, open your website by typing in mason.gmu.edu/~username in the browser to see your files.. How to copy file from Windows to Unix using PuTTY?2 Answers. Download PSCP.EXE from Putty download page.. Open command prompt and type set PATH=<path to the pscp.exe file>. In command prompt point to the location of the pscp.exe using cd command.. Type pscp.. use the following command to copy file form remote server to the local system. pscp [options] [user@]host:source target.. Can Windows data transfer to Linux?File Transfer Protocol (FTP) is another great way to copy your data from Windows to Linux. Many may find this method more manageable since you do not need to type any commands. Check your Linux server and ensure it is up and running for this approach. Also, you'll need an app such as FileZilla to transfer with FTP.
How to copy file from Windows to Linux using SCP?Select the File Protocol from the drop-down list as SCP first. Add the IP address of Ubuntu within the “Hostname” field. Add user name and password to connect and press Login. After a successful connection, drag the files from the left area to the right side of WinSCP to transfer.
|