]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/torrent
man pages: fix duplicate words
[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 .B -i
27 .I peer-id
28 ] [
29 .I file
30 ]
31 .SH DESCRIPTION
32 BitTorrent is a protocol for efficient file distribution
33 over the internet. Files are split into small pieces
34 that are then downloaded by clients in random order.
35 As soon as a client completes a piece, it makes the piece 
36 available for others to download.
37 .PP
38 To find other clients (peers), a tracker-server is
39 contacted.
40 .PP
41 Before files can be transmitted, a torrent-file needs
42 to be created describing the pieces of the files and
43 other meta-data like network addresses of the trackers.
44 .PP
45 This is done with the
46 .B -c
47 option. If provided,
48 .I torrent
49 reads the file given at the final
50 .I file
51 argument (or standard-input when omitted) and writes
52 a torrent file to standard-output and exits.
53 A
54 .I tracker-url
55 should be given with the
56 .B -t
57 option in that case. A list of trackers can be obtained
58 on the web, see the examples below.
59 .PP
60 If the files in the torrent are also available from a url, a
61 .I webseed-url
62 can be passed with the
63 .B -w
64 option. If
65 .I webseed-url
66 ends with a slash, the filename, from the torrent, concatenated
67 with the url forms the target url.
68 .PP
69 Without the
70 .B -c
71 option,
72 .I torrent
73 downloads the files that are described in the torrent-file
74 given by the
75 .I file
76 argument to the current working directory. If no
77 .I file
78 is given, the torrent is read from standard-input.
79 .PP
80 Normally, the program exits immediately after all pieces
81 have been completed.
82 The
83 .B -s
84 option causes it to keep running and serve the remaining
85 clients (also known as seeding).
86 .PP
87 Trackers use a subset of the HTTP protocol, so an
88 alternative 
89 .IR webfs (4)
90 mountpoint can be given with the
91 .B -m
92 option (defaults to
93 .BR /mnt/web ).
94 .PP
95 The
96 .B -v
97 option causes
98 .I torrent
99 to list the files in the torrent-file before downloading.
100 .PP
101 The
102 .B -d
103 option produces verbose debug output to standard-error.
104 .PP
105 To monitor the download progress, the
106 .B -p
107 option can be given to cause the completed and total number of
108 pieces written as a line of text to standard-output in one
109 second intervals.
110 .PP
111 The
112 .B -i
113 option allows you to set the 20-byte
114 .I peer-id
115 that is sent to trackers and peers. If less than 20 bytes, the
116 .I peer-id
117 will be padded on the right with random ASCII numbers. This is
118 useful to fool trackers that filter clients based on the
119 .I peer-id
120 .
121 .SH EXAMPLES
122 Create new torrent file
123 .EX
124 ip/torrent -t http://exodus.desync.com/announce \\
125         -c 9atom.iso >9atom.torrent
126 .EE
127 .LP
128 Download the latest iso file of the distribution 
129 .EX
130 cd /tmp
131 hget http://r-36.net/9front/9front.iso.bz2.torrent | \\
132         ip/torrent -pv | \\
133         aux/statusbar 'download...'
134 .EE
135 .LP
136 Get list of public alive trackers to choose from
137 .EX
138 hget http://www.trackon.org/api/live
139 .EE
140 .LP
141 .SH SOURCE
142 .B /sys/src/cmd/ip/torrent.c
143 .SH "SEE ALSO"
144 .IR hget (1),
145 .IR webfs (4)
146 .SH HISTORY
147 .I Torrent
148 first appeared in 9front (October, 2011).