Computers nowadays are an essential part of our everyday life, yet a simple “just send that file over” often still is a problem. There obviously are numerous solutions, most of them are however tailored to set up permanent access, e.g. samba shared, fileservers. Setting these up involves quite some work – too much work for just sharing one file once. Enter woof. woof allows you to share single files and directories with great ease, all you need is a linux shell and python installed.
- Download woof and save it to a location in your PATH (e.g. /usr/local/bin).
- Make it executable (e.g. chmod +x /usr/local/bin/woof).
- Run it, using the file or directory you want to share as parameter (e.g. woof picture_of_me.png).
- woof will now print an URL like this “Now serving on http://18.104.22.168:1234/”. Give this URL to the recipient of the file.
- The recipient can now paste this URL to his browser, which will then start downloading the shared file or directory (in that case, a .tar.gz will be created).
- woof will print a line similar to this for every request: “139-208-103-86.dynamic.dsl.tng.de – – [11/Dec/2008 13:02:39] “GET /picture_of_me.png HTTP/1.1” 200 -“
The following Options are available:
- -i <ip address>: choose a particular IP on a multi-homed system
- -p <port>: choose a port
- -c <count>: Amount of requests to serve, before woof terminates itself. Usually best set to 1.
- -u: Skip compression.
- -s: Instead of a file or directory, woof can also distribute itself. Use -s instead of the parameter for a file or directory.
Instead of having to type your commonly used options everytime you use woof, you can also place them in INI-style configuration files at /etc/woofrc or ~/.woofrc:
[main] ip = 22.214.171.124 port = 1234 count = 1 compressed = true