—————— 下载安装 ——————
wget http://hivelocity.dl.sourceforge.net/project/mktorrent/mktorrent/1.0/mktorrent-1.0.tar.gz
tar zxvf mktorrent-1.0.tar.gz
cd mktorrent-1.0
make & make install
cd ..
rm -rf mktorrent-1.0.tar.gz mktorrent-1.0
—————— 使用示例 ——————
mktorrent -l 21 -p -a udp://open.demonii.com:1337 "/home/transmission/Downloads/hello.txt" -o "test.torrent"
mktorrent - runs mktorrent
-l 21 - Piece length (or size) for the torrent. It's 2^n bytes, so '-l 21' would create a 2^21 = 2MB piece size.
-p - Sets the private flag on the torrent. This should be set when it will be seeded on private trackers.
-a http://[..] - Tracker announce url for the torrent.
~/"files/[..]" - Path to folder or file that the torrent is being created from.
-o file.torrent - Filename for the .torrent file.
Once the .torrent file is created, simply copy it to the watch directory, and your torrent client will start seeding it.
参考:
mktorrent (SSH) Creating Torrents
https://bbs.zephyrxt.com/thread-17995-1-1.html