Reputation: 2265
I need to get the data from Windows box and store it on my linux box using wget.
#!/bin/sh
#
user="vim1"
pass="pass11"
host="10.20.15.124"
#from this folder
localbase="C:/Users/i1/Desktop/datafolder"
remotebase="/home/myfolder"
wget_opts="-q"
When I run
wget --user=vim1 --password='pass11' 10.20.15.124
it does nothing. Just says
Connecting to 10.20.15.124:80...
Can someone tell me why?
Upvotes: 1
Views: 13755
Reputation: 7112
If by any lucky accident you have Python on your source machine, then you can use the preinstalled SimpleHTTPServer module to serve your file over HTTP. Go to the folder with your file and run
python -m SimpleHTTPServer
or if you have Python 3
python3 -m http.server
And then on your Linux machine use
wget http://<source-machine-IP>:8000/<filename>
The module allows to specify an optional PORT parameter, if the default 8000 port is not suitable for you.
Upvotes: 1
Reputation: 45586
As pointed out by @n.m. and @htor, you need to have an HTTP server running on your Windows machine to be able to connect this way. What you can do is use Samba to mount a shared folder from your Windows box on your Linux box and copy the files to a local folder on your Linux box (google buzzword: smbmount
).
Upvotes: 1
Reputation:
As already commented, if you don't have an HTTP or FTP server up and running on your Windows box you will have problems connecting to it through internet. Until you have resolved that, a relatively fast way to transfer your files would be through sneakernet if you have physical access to the Windows box.
Upvotes: 1