[Show all top banners]

manramro6
Replies to this thread:

More by manramro6
What people are reading
Subscribers
:: Subscribe
Back to: Computer/IT Refresh page to view new replies
 Help Linux Command Line
[VIEWED 4039 TIMES]
SAVE! for ease of future access.
Posted on 02-21-16 10:07 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hello Sajha mitra haru,

I need to transfer file/folder from Windows PC to Linux using PUTTY terminal and Linux to PC.
Any idea? Which command can I use?


 
Posted on 02-21-16 11:04 PM     [Snapshot: 36]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

use winscp. It's much better. You can send/receive file back and forth and it uses SFTP if you choose to. It's drag and drop afterwards.

Virtualization also helps.

With Putty, you can only do "scp", I am not aware you can download files direct from it to your windows PC.

This command below is basically for copying files from your current linux host to remote linux host.
scp -P 2222 *.txt your_username@remotehost.com:/some/remote/directory


 
Posted on 02-21-16 11:25 PM     [Snapshot: 49]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hi sixfour,

Thank you for your respond. I must use only Command line because I do't have privilege for other features. Like you mention drag and drop.
Therefore, I need the command.
 
Posted on 02-21-16 11:40 PM     [Snapshot: 58]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

well, I was gonna say to use X11, another feature that you can use with putty to download files. I've read about it but never tried.

But wait, so you want to copy files to windows right? Windows is GUI, if you can use Putty, why can't you use winscp? You can use the same login credentials to run winscp. Winscp is like ftp. It's not like putty. You still need to use putty to do things. And you don't need any privilege to run winscp, it just downloads and run it. I don't know if you can download if that's what you are talking when you said privilege.

Here is a tip. What would I do if I were you.
1. I'm assuming you have a separate personal webhost somewhere. Enable ssh access to that webhost. Connect from your current linux to your webhost via scp, share files as you wish.
2. Back home, use winscp on your own computer and transfer files to/from your webhost.
3. At work, use your linux machine to download files from your personal webhost.
Bit tedious but it always works for me.
 
Posted on 02-21-16 11:54 PM     [Snapshot: 64]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Here's an example, am creating a topology.
PC A(Linux) - Work PC, less privilege - 172.16.2.104
PC B(Windows) - Home PC, - 192.168.1.1
PC C(Webhost) - Remote Personal hosting - 10.10.200.254

From PC A(Linux),
#cd /home/dir1/dir2
change to directory where your files are
#ls -ld
check the permission if needed
#scp -P 2222 *.* user@10.10.200.254:.
here I'm using 2222 as port number, yours may be different, u can filter file type, here I did *.* or if you want to copy all files , you can do only * instead of *.* and it'll dump all files in home directory of remote host 10.10.200.254

From PC B(windows)
-install winscp
-access to your webhost 10.10.200.254
-download all files needed or upload any files for ur linux PC at work.

From PC A(Linux)
#scp -P 2222 user@10.10.200.254:/home/* .
this will copy all files from /home directory of remote host to your linux machine's current directory.

It's just an idea how to get around. Hope that helps.

 
Posted on 02-21-16 11:56 PM     [Snapshot: 77]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Tips - if you want to transfer folders, you need to use tarballs.
 
Posted on 02-22-16 5:25 PM     [Snapshot: 216]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I hope you have figured this out by now.
Also remember in some cases you need to run dostounix or sed to convert the files so that you don't see weird characters when you cat the file. Windows does new line character differently than linux.

I use FileZilla sever to setup a FTP server in windows. Place the files in the appropriate directory and then just run basic ftp commands from linux get / put files.

#ftp user@
#Enter credentials
#cd
#bin
#hash
#get yourfilename
#put youfilename
#bye
--------------------------------------------------------
http://www.thegeekstuff.com/2010/06/ftp-sftp-tutorial/


 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 200 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
Anybody gotten the TPS EAD extension alert notice (i797) thing? online or via post?
TPS EAD auto extended to June 2025 or just TPS?
nrn citizenship
Toilet paper or water?
Mamta kafle bhatt is still missing
ढ्याउ गर्दा दसैँको खसी गनाउच
ChatSansar.com Naya Nepal Chat
whats wrong living with your parents ?
TPS advance parole Travel document i-131, Class of Admission ?
Tourist Visa - Seeking Suggestions and Guidance
Now Trump is a convicted criminal .
Ajay Kumar Dev sentenced to 378 yrs
Biden said he will issue new Employment visa for someone with college degree and job offers
Why Americans reverse park?
Problems of Nepalese students in US
Nepali Passport Renewal
lost $3500 on penny stocks !!!
Biden out, Trump next president, so what’s gonna happen to TPS, termination?
They are openly permitting undocumented immigrants to participate in federal elections in Arizona now.
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters