summaryrefslogtreecommitdiffhomepage
path: root/blog/entry/netcatsendfile.mdwn
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2015-11-18 10:09:12 -0700
committerSean Whitton <spwhitton@spwhitton.name>2015-11-18 10:09:12 -0700
commitdeb4807989d127e40e44c1192477c40e30f88180 (patch)
tree41e557cc82e01b0e76de8d4f548105023af8dfee /blog/entry/netcatsendfile.mdwn
parent675d02fc2c3d2bfb53a81db6d2c55f0dfbbd79ed (diff)
downloadwiki-deb4807989d127e40e44c1192477c40e30f88180.tar.gz
imported PyBlosxom entries and comments
Diffstat (limited to 'blog/entry/netcatsendfile.mdwn')
-rw-r--r--blog/entry/netcatsendfile.mdwn10
1 files changed, 10 insertions, 0 deletions
diff --git a/blog/entry/netcatsendfile.mdwn b/blog/entry/netcatsendfile.mdwn
new file mode 100644
index 0000000..e9b8cce
--- /dev/null
+++ b/blog/entry/netcatsendfile.mdwn
@@ -0,0 +1,10 @@
+[[!meta date="2012-05-06 09:23:00"]]
+[[!meta title="Use netcat to quickly transmit a large file over local LAN"]]
+[[!tag imported_PyBlosxom tech gnu+linux]]
+
+Similar to the Python serve-a-single-directory trick, v. pleased to be
+able to make use of this the other day:
+
+ { echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c <some.file)\r\n\r\n"; cat some.file; } | nc -l -p 8080
+
+([source](https://en.wikipedia.org/wiki/Netcat#Setting_up_a_one-shot_webserver_on_port_8080_to_present_the_content_of_a_file))