[manual index][section index]

NAME

torrent/create - create torrent file

SYNOPSIS

torrent/create [ -vf ] [ -d dir ] [ -p piecelen ] tracker file ...

DESCRIPTION

Torrent/create creates a torrent file for publishing file's with peer information provided by tracker. Torrent files contain the url of a tracker, which is contacted by bittorrent clients to find peers to exchange pieces with. The torrent file contains cryptographic hashes of pieces of the files described in the torrent file. The resulting torrent file is written to standard output.

-v
Be verbose, this prints the total size, number of pieces and the ``info hash'' (the hash of the file contents) to standard error.
-f
Force creation of the torrent file. Without this option, torrent/create checks that tracker is a valid url. If it is not, it stops with an error.
-d dir
This option is required when multiple file's are specified. It is the directory in which all file's in the torrent will appear.
-p piecelen
The length of a piece to piecelen. Piecelen must be a power of two, it defaults to 256k. Bittorrent regards the files to be transferred as a contiguous stream of bytes. This stream is split into pieces. The torrent file contains a hash (SHA-1) of each piece. Torrents are exchanged (verified) in terms of pieces. The piece length is a tradeoff between size of the torrent file (more pieces means more hashes) and being able to exchange small units (which helps during start up and in face of malicious peers).

SOURCE

/appl/cmd/torrent/create.b
/module/bittorrent.m
/appl/lib/bittorrent.b

SEE ALSO

torrenttrack(1), wm-torrent(1), torrentpeer(4).

BUGS

Having to specify the directory separately is annoying.

TORRENTCREATE(1 ) Rev:  Wed Feb 22 04:14:06 GMT 2023