2011-10-22 23:33:35 +00:00
|
|
|
.TH TORRENT 1
|
|
|
|
.SH NAME
|
|
|
|
torrent \- bittorrent client
|
|
|
|
.SH SYNOPSIS
|
2011-10-25 01:48:20 +00:00
|
|
|
.B ip/torrent
|
2011-10-22 23:33:35 +00:00
|
|
|
[
|
|
|
|
.B -d
|
2011-10-25 12:09:41 +00:00
|
|
|
] [
|
2011-10-22 23:33:35 +00:00
|
|
|
.B -v
|
2011-10-25 12:09:41 +00:00
|
|
|
] [
|
2011-10-22 23:33:35 +00:00
|
|
|
.B -p
|
2011-10-25 12:09:41 +00:00
|
|
|
] [
|
2011-10-22 23:33:35 +00:00
|
|
|
.B -m
|
|
|
|
.I mtpt
|
2011-10-25 12:09:41 +00:00
|
|
|
] [
|
|
|
|
.B -t
|
2012-04-15 22:50:25 +00:00
|
|
|
.I tracker-url
|
|
|
|
] [
|
|
|
|
.B -w
|
|
|
|
.I webseed-url
|
2011-10-25 12:09:41 +00:00
|
|
|
] [
|
2011-10-22 23:33:35 +00:00
|
|
|
.B -s
|
2011-10-25 12:09:41 +00:00
|
|
|
] [
|
|
|
|
.B -c
|
|
|
|
] [
|
2011-10-22 23:33:35 +00:00
|
|
|
.I file
|
|
|
|
]
|
|
|
|
.SH DESCRIPTION
|
2011-10-25 01:48:20 +00:00
|
|
|
BitTorrent is a protocol for efficient file distribution
|
|
|
|
over the internet. Files are split into small pieces
|
|
|
|
that are then downloaded by clients in random order.
|
|
|
|
As soon as a client completes a piece, it makes the piece
|
|
|
|
available for others to download.
|
|
|
|
.PP
|
|
|
|
To find find other clients (peers), a tracker-server is
|
|
|
|
contacted.
|
|
|
|
.PP
|
|
|
|
Before files can be transmitted, a torrent-file needs
|
|
|
|
to be created describing the pieces of the files and
|
|
|
|
other meta-data like network addresses of the trackers.
|
|
|
|
.PP
|
2011-10-25 12:09:41 +00:00
|
|
|
This is done with the
|
|
|
|
.B -c
|
|
|
|
option. If provided,
|
|
|
|
.I torrent
|
|
|
|
reads the file given at the final
|
|
|
|
.I file
|
|
|
|
argument (or standard-input when omited) and writes
|
|
|
|
a torrent file to standard-output and exits.
|
2012-04-15 22:50:25 +00:00
|
|
|
A
|
|
|
|
.I tracker-url
|
2011-10-25 12:09:41 +00:00
|
|
|
should be given with the
|
|
|
|
.B -t
|
2011-10-25 12:28:35 +00:00
|
|
|
option in that case. A list of trackers can be obtained
|
|
|
|
on the web, see the examples below.
|
2011-10-25 12:09:41 +00:00
|
|
|
.PP
|
2012-04-15 22:50:25 +00:00
|
|
|
If the files in the torrent are also available from a url, a
|
|
|
|
.I webseed-url
|
|
|
|
can be passed with the
|
|
|
|
.B -w
|
|
|
|
option. If
|
|
|
|
.I webseed-url
|
|
|
|
ends with a slash, the filename, from the torrent, concatinated
|
|
|
|
with the url forms the target url.
|
|
|
|
.PP
|
2011-10-25 12:09:41 +00:00
|
|
|
Without the
|
|
|
|
.B -c
|
|
|
|
option,
|
|
|
|
.I torrent
|
2011-10-25 01:48:20 +00:00
|
|
|
downloads the files that are described in the torrent-file
|
|
|
|
given by the
|
2011-10-22 23:33:35 +00:00
|
|
|
.I file
|
2011-10-25 01:48:20 +00:00
|
|
|
argument to the current working directory. If no
|
2011-10-22 23:33:35 +00:00
|
|
|
.I file
|
2011-10-25 01:48:20 +00:00
|
|
|
is given, the torrent is read from standard-input.
|
2011-10-22 23:33:35 +00:00
|
|
|
.PP
|
2011-10-25 01:48:20 +00:00
|
|
|
Normally, the program exits immediately after all pieces
|
|
|
|
have been completed.
|
2011-10-22 23:33:35 +00:00
|
|
|
The
|
|
|
|
.B -s
|
2011-10-25 01:48:20 +00:00
|
|
|
option causes it to keep running and serve the remaining
|
|
|
|
clients (also known as seeding).
|
2011-10-22 23:33:35 +00:00
|
|
|
.PP
|
2011-10-25 01:48:20 +00:00
|
|
|
Trackers use a subset of the HTTP protocol, so an
|
|
|
|
alternative
|
2011-10-22 23:33:35 +00:00
|
|
|
.IR webfs (4)
|
2011-10-25 01:48:20 +00:00
|
|
|
mountpoint can be given with the
|
2011-10-22 23:33:35 +00:00
|
|
|
.B -m
|
|
|
|
option (defaults to
|
|
|
|
.BR /mnt/web ).
|
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.B -v
|
|
|
|
option causes
|
|
|
|
.I torrent
|
2011-10-25 01:48:20 +00:00
|
|
|
to list the files in the torrent-file before downloading.
|
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.B -d
|
|
|
|
option produces verbose debug output to standard-error.
|
2011-10-22 23:33:35 +00:00
|
|
|
.PP
|
|
|
|
To monitor the download progress, the
|
|
|
|
.B -p
|
2011-10-25 01:48:20 +00:00
|
|
|
option can be given to cause the completed and total number of
|
|
|
|
pieces written as a line of text to standard-output in one
|
|
|
|
second intervals.
|
2011-10-25 12:09:41 +00:00
|
|
|
.SH EXAMPLES
|
|
|
|
Create new torrent file
|
|
|
|
.EX
|
|
|
|
ip/torrent -t http://exodus.desync.com/announce \\
|
|
|
|
-c 9atom.iso >9atom.torrent
|
|
|
|
.EE
|
|
|
|
.LP
|
2011-10-25 01:48:20 +00:00
|
|
|
Download the latest iso file of the distribution
|
2011-10-22 23:33:35 +00:00
|
|
|
.EX
|
|
|
|
cd /tmp
|
2011-10-25 01:48:20 +00:00
|
|
|
hget http://r-36.net/9front/9front.iso.bz2.torrent | \\
|
|
|
|
ip/torrent -pv | \\
|
|
|
|
aux/statusbar 'download...'
|
2011-10-22 23:33:35 +00:00
|
|
|
.EE
|
2011-10-25 12:28:35 +00:00
|
|
|
.LP
|
|
|
|
Get list of public alive trackers to choose from
|
|
|
|
.EX
|
|
|
|
hget http://www.trackon.org/api/live
|
|
|
|
.EE
|
|
|
|
.LP
|
2011-10-22 23:33:35 +00:00
|
|
|
.SH SOURCE
|
|
|
|
.B /sys/src/cmd/ip/torrent.c
|
2011-10-25 01:48:20 +00:00
|
|
|
.SH "SEE ALSO"
|
2011-10-22 23:33:35 +00:00
|
|
|
.IR hget (1),
|
|
|
|
.IR webfs (4)
|