Imagine a situation. You are at a conference and need to send another user a file from your Eee PC. Suddenly you realize that you forgot your USB stick at the hotel, and your laptop has neither an infrared port nor Bluetooth. What do you do? You use woof, a Python script that uses a tiny built-in server to serve a single file. To use woof, make sure that Python is installed on your machine. Download the script, make it executable using the chmod +x woof command, and you are ready to go. To share a file with woof, use the woof -i [ipaddress] -p [port] [file] command, where ipaddress refers to the IP address of your laptop, while port specifies the port though which woof serves the file. So the actual woof command may look like this:
woof -i 192.168.0.5 -p 8888 loremipsum.txt
When you run the command, the recipient can download the file by simply pointing the browser to the specified IP address (in this case, it’s http://192.168.0.5:888). Once the file is downloaded, the woof server quits. If you need to share a file with several users, you can use the -c option, which specifies how many times a particular file can be downloaded. For example, if you want to share the file with three users, you can use the following command:
woof -i 192.168.0.5 -p 8888 -c 3 loremipsum.txt
Using woof, you can also share a directory. To do this, specify the folder you want to share followed by a slash:
woof -i 192.168.0.5 -p 8888 my_documents/
To speed up the transfer, woof creates a tar archive of the directory and compresses it with gzip, so the recipient receives it as a my_documents.tar.gz file.