Forrest logo
back to the mktorrent tool

mktorrent:tldr:b70b1

mktorrent: Create a private torrent with a 2^21 KB piece size.
$ mktorrent -p -a ${tracker_announce_url} -l ${21} -o ${path-to-example-torrent} ${filename_or_directory}
try on your machine

This command is used to create a torrent file using the "mktorrent" tool. Here's a breakdown of the different components of the command:

  • "mktorrent": This is the command itself, indicating that you want to use the "mktorrent" tool.
  • "-p": This flag specifies that the torrent should be created in private mode. In private mode, the torrent is only available to users who are part of the tracker, and it is not publicly accessible.
  • "-a ${tracker_announce_url}": This flag is used to specify the announce URL of the tracker. The "${tracker_announce_url}" is a placeholder variable that should be replaced with the actual URL of the tracker you want to use.
  • "-l ${21}": This flag sets the piece size of the torrent. The "${21}" is a placeholder variable that should be replaced with the desired piece size, expressed as a power of 2 (e.g., 18 for 256KB, 19 for 512KB, etc.).
  • "-o ${path-to-example-torrent}": This flag indicates the output file name and path for the torrent file that will be generated. The "${path-to-example-torrent}" is a placeholder variable that should be replaced with the desired path and filename for the torrent file.
  • "${filename_or_directory}": This is the input file or directory that you want to create a torrent for. Replace "${filename_or_directory}" with the actual path to the file or directory you want to include in the torrent.

Overall, this command will create a torrent file with the specified settings, including the announce URL and piece size, for the given file or directory.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mktorrent tool