Download Latest Version pf.tar.gz (1.7 MB)
Email in envelope

Get an email when there's a new version of portfree

Home
Name Modified Size InfoDownloads / Week
pf.tar.gz 2011-08-03 1.7 MB
pf.cygwin.win32.exe.zip 2011-08-03 1.7 MB
README 2011-07-05 1.0 kB
Totals: 3 Items   3.4 MB 0
README: information about the pf utility
---------
PTHOEM LINUX UTILS (c) 2008-2011 Peter Thoemmes
Weinbergstrasse 3a, D-54441 Ockfen/Germany

pf is made to find a free TCP or UDP port number by trying
to open and bind a socket with that port number at the IPv4
address 0.0.0.0 or the given IPv4 address.

   USAGE: pf -start <port> [-u] [-ipv4_addr <ipv4_addr>]

It starts with port <port> and tries 128 numbers. The exit code
will be '-1' if no free port was found. If successful, the free
port will be calculated like this:

   <free-port> = <port> + <exit-code>

Beside that the found free port number or just '-1' is written
to stdout for further analysis.

When run with '-u' the test is done for UDP ports.

Under Linux you will see that ports below 1024 are never free
for normal users, but for 'root'. So it makes a difference
from which user account the utility is run.

Examples:

    pf -start 445 -u
    446

    pf -start 445 -u -ipv4_addr 127.0.0.1
    446

I wish you a lot of success with this utility,
Peter
Source: README, updated 2011-07-05