3

I would like to download a file to null in windows cli just for testing purposes.

In linux i used

wget http://download.thinkbroadband.com/1GB.zip -O /dev/null

This kept my connection busy for a while.

Is there any way to do this in command prompt or power shell in windows 7?

Also other solutions to generate traffic from internet,ut withous saving it to disk, will be accepted.

RokX
  • 334
  • 6
  • 16

2 Answers2

13

Using Windows' (roughly) equivalent NUL device should mimic the Linux behaviour sufficiently:

wget http://download.thinkbroadband.com/1GB.zip -O NUL

Update: Recent builds of wget for Windows are available here.

Community
  • 1
  • 1
zb226
  • 9,586
  • 6
  • 49
  • 79
  • 1
    Don't laugh, but the only way I could have wget on Windows 10 to *not* create a wget-log file is to add `-O NUL -o NUL` (both letter o, uppercase and lowercase). No other combination was *not* creating a log file. Some users may think that other combinations may work because they have no other switches behind, but I do. GNU wget then created log files named after these switches... Not very clever... – Fabien Haddadi Sep 01 '17 at 12:41
  • 1
    thanks for the wget link, wondering why it's not updated on sourceforge since 2008. https://sourceforge.net/projects/gnuwin32/files/wget/ – Udayraj Deshmukh Mar 02 '18 at 11:58
3

You can use that exact same command on any Windows with Cygwin. Make sure you select Wget in the package list when installing Cygwin

golimar
  • 2,419
  • 1
  • 22
  • 33
  • 2
    No need to install cygwin. A zip package of unix tools for windows is available[here](https://sourceforge.net/projects/unxutils/) – RokX Jun 10 '14 at 09:50
  • Be careful with those binaries. They are from 2007 while Cygwin is still updated regularly. Especially with network tools that get and process potentially unsafe data from internet servers – golimar Nov 19 '21 at 12:40