]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/torrent
paint(1) fix bad cross reference
[plan9front.git] / sys / man / 1 / torrent
1 .TH TORRENT 1
2 .SH NAME
3 torrent \- bittorrent client
4 .SH SYNOPSIS
5 .B ip/torrent
6 [
7 .B -d
8 ] [
9 .B -v
10 ] [
11 .B -p
12 ] [
13 .B -m
14 .I mtpt
15 ] [
16 .B -t
17 .I tracker-url
18 ] [
19 .B -w
20 .I webseed-url
21 ] [
22 .B -s
23 ] [
24 .B -c
25 ] [
26 .I file
27 ]
28 .SH DESCRIPTION
29 BitTorrent is a protocol for efficient file distribution
30 over the internet. Files are split into small pieces
31 that are then downloaded by clients in random order.
32 As soon as a client completes a piece, it makes the piece 
33 available for others to download.
34 .PP
35 To find find other clients (peers), a tracker-server is
36 contacted.
37 .PP
38 Before files can be transmitted, a torrent-file needs
39 to be created describing the pieces of the files and
40 other meta-data like network addresses of the trackers.
41 .PP
42 This is done with the
43 .B -c
44 option. If provided,
45 .I torrent
46 reads the file given at the final
47 .I file
48 argument (or standard-input when omited) and writes
49 a torrent file to standard-output and exits.
50 A
51 .I tracker-url
52 should be given with the
53 .B -t
54 option in that case. A list of trackers can be obtained
55 on the web, see the examples below.
56 .PP
57 If the files in the torrent are also available from a url, a
58 .I webseed-url
59 can be passed with the
60 .B -w
61 option. If
62 .I webseed-url
63 ends with a slash, the filename, from the torrent, concatinated
64 with the url forms the target url.
65 .PP
66 Without the
67 .B -c
68 option,
69 .I torrent
70 downloads the files that are described in the torrent-file
71 given by the
72 .I file
73 argument to the current working directory. If no
74 .I file
75 is given, the torrent is read from standard-input.
76 .PP
77 Normally, the program exits immediately after all pieces
78 have been completed.
79 The
80 .B -s
81 option causes it to keep running and serve the remaining
82 clients (also known as seeding).
83 .PP
84 Trackers use a subset of the HTTP protocol, so an
85 alternative 
86 .IR webfs (4)
87 mountpoint can be given with the
88 .B -m
89 option (defaults to
90 .BR /mnt/web ).
91 .PP
92 The
93 .B -v
94 option causes
95 .I torrent
96 to list the files in the torrent-file before downloading.
97 .PP
98 The
99 .B -d
100 option produces verbose debug output to standard-error.
101 .PP
102 To monitor the download progress, the
103 .B -p
104 option can be given to cause the completed and total number of
105 pieces written as a line of text to standard-output in one
106 second intervals.
107 .SH EXAMPLES
108 Create new torrent file
109 .EX
110 ip/torrent -t http://exodus.desync.com/announce \\
111         -c 9atom.iso >9atom.torrent
112 .EE
113 .LP
114 Download the latest iso file of the distribution 
115 .EX
116 cd /tmp
117 hget http://r-36.net/9front/9front.iso.bz2.torrent | \\
118         ip/torrent -pv | \\
119         aux/statusbar 'download...'
120 .EE
121 .LP
122 Get list of public alive trackers to choose from
123 .EX
124 hget http://www.trackon.org/api/live
125 .EE
126 .LP
127 .SH SOURCE
128 .B /sys/src/cmd/ip/torrent.c
129 .SH "SEE ALSO"
130 .IR hget (1),
131 .IR webfs (4)