servefile(1)


NAME

   servefile - small HTTP-Server for temporary file transfer

SYNOPSIS

   servefile [-h] [--version] [-p PORT] [-u] [-s MAX_UPLOAD_SIZE] [-l]

          [--ssl]   [--key   KEY]   [--cert   CERT]   [-a   user:password]
          file/directory

DISCLAIMER

   Do not use this as a normal web server. This server  is  optimized  for
   running  a  short time and to send files to other people, not for doing
   high-performance static file serving.

DESCRIPTION

   Servefile is a small HTTP-server intended for temporary  file  transfer
   mostly  in the local network. It aims to make transferring single files
   as painless as possible and to replace tar/netcat solutions.

   With just a file as argument servefile serves just that  one  file  and
   redirects all HTTP requests to that file.

   Uploads can be done with curl, wget (see EXAMPLES) or a normal browser.
   In upload mode with -u servefile creates  a  directory  and  saves  all
   uploaded  files  into  that directory. When uploading with curl or wget
   the filename is extracted from the path part of the url  used  for  the
   upload.

   For SSL support python-openssl (pyssl) needs to be installed. If no key
   and cert is given, servefile will generate  a  key  pair  for  you  and
   display its fingerprint.

   In  --tar  mode  the  given  file or directory will be packed on (each)
   request and piped to the  client  through  the  HTTP  connection,  thus
   serving  always  the  latest  content  of  the directory and preventing
   temporary file creaton. Tar files will be created containing  only  the
   lowest  directory  name  from  the full path, so using /path/to/dir/ as
   file/directory argument will create a tar file starting with  the  dir/
   directory.  When  giving  a file as argument, only the file without any
   path will be in the tarfile.  Symlinks will not be dereferenced.

COMMAND SUMMARY

   positional arguments:
   file/directory
          file or directory (with -l or  -u) which  should  be  served  or
          uploaded to

   optional arguments:
   -h, --help
          Show a help message and exit

   --version
          Show program's version number and exit

   -p PORT, --port PORT
          Port to listen on

   -u, --upload
          Enable uploads to a given directory

   -s MAX_UPLOAD_SIZE, --max-upload-size MAX_UPLOAD_SIZE
          Limit  upload  size  in kB. Size modifiers are allowed, e.g. 2G,
          12MB, 1B.

   -l, --list-dir
          Show directory indexes and allow access to all subdirectories

   --ssl  Enable SSL. If no key/cert is specified one will be generated.

   --key KEY
          Key file to use for SSL. If no cert is given with --cert the key
          file will also be searched for a cert

   --cert CERT
          Certfile to use for SSL

   -a user:password, --auth user:password
          Set user and password for HTTP basic authentication

   --realm REALM
          Set  a realm for HTTP basic authentication. This is an arbitrary
          string which is displayed when doing HTTP basic authentication

   -t, --tar
          Enable on the fly tar creation  for  given  file  or  directory.
          Note: Download continuation will not be available.

   -c method, --compression method
          Set  compression  method, only in combination with --tar. Can be
          one of none, gzip, bzip2.

   -4, --ipv4-only
          Listen on IPv4 only

   -6, --ipv6-only
          Listen on IPv6 only

EXAMPLES

   Serving a single file with SSL and HTTP Basic auth:

          servefile --ssl --auth foo:bar the_file

   Enabling uploads to a directory:

          servefile -u dir/

   Uploading file foo as bar to servefile via command line:

          curl -X PUT http://ip:port/bar --data-binary @foo
          curl -X POST http://ip:port/bar --data-binary @foo
          wget http://ip:port/bar --post-file=foo

   Serving a on the fly generated tar.gz file of a directory:

          servefile --tar -c gzip path/to/dir

AUTHOR

   servefile is developed by Sebastian Lohff <seba@someserver.de>





Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.