Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am interested in rendering a torrent file into a readable form (to see what files does it reference, what tracker information does it contain etc.). What a tool can I use to do just this?

share|improve this question

3 Answers 3

up vote 12 down vote accepted

btshowmetainfo, formerly included in the BitTorrent distribution but now largely installed with BitTornado (a fork of the BitTorrent 3.x codebase), does just that.

$ btshowmetainfo amd64cd-5.1.2.iso.torrent 
btshowmetainfo 20030621 - decode BitTorrent metainfo files

metainfo file.: amd64cd-5.1.2.iso.torrent
info hash.....: e30c05f2330ba4869eefb90bf5978a505303b235
file name.....: amd64cd-5.1.2.iso
file size.....: 253325312 (966 * 262144 + 94208)
announce url..: http://tracker.netbsd.org:6969/announce
share|improve this answer

You can use transmission-show, included in the Gnome Transmission BitTorrent client.

$ transmission-show amd64cd-5.1.2.iso.torrent
Name: amd64cd-5.1.2.iso
File: amd64cd-5.1.2.iso.torrent

GENERAL

  Name: amd64cd-5.1.2.iso
  Hash: e30c05f2330ba4869eefb90bf5978a505303b235
  Created by: 
  Created on: Sun Feb  5 01:31:29 2012
  Piece Count: 967
  Piece Size: 256.0 KiB
  Total Size: 253.3 MB
  Privacy: Public torrent

TRACKERS

  Tier #1
  http://tracker.netbsd.org:6969/announce

FILES

  amd64cd-5.1.2.iso (253.3 MB)

If you're using an older version of Transmission, you can use the older transmissioncli --info command:

$ transmissioncli --info amd64cd-5.1.2.iso.torrent
Transmission 2.03 (11030) - http://www.transmissionbt.com/
hash:   e30c05f2330ba4869eefb90bf5978a505303b235
name:   amd64cd-5.1.2.iso

tracker tier #1:
        announce:       http://tracker.netbsd.org:6969/announce
size:   253325312 (966 * 262144 + 94208)
file(s):
        amd64cd-5.1.2.iso (253325312)
share|improve this answer
    
-1 my version of transmission-cli (2.51 Debian testing amd64) does not have this option –  ixtmixilix May 17 '12 at 23:48
    
@ixtmixilix: Answer updated to use new "transmission-show" command. –  Teddy May 24 '12 at 16:54

lstor, including the ability to calculate the hash, which can be quite useful in shell scripts:

$ lstor Chakra\ 2012.02\ Archimedes\ x86.torrent -qo __hash__
B3472076574BC666396766AB3B28C0054D740B46

$ lstor Chakra\ 2012.02\ Archimedes\ x86.torrent -q
NAME Chakra 2012.02 Archimedes x86.torrent
SIZE 1.4 GiB (1461 * 1.0 MiB + 0 bytes)
HASH B3472076574BC666396766AB3B28C0054D740B46
URL  http://linuxtracker.org:2710/********************************/announce
PRV  YES (DHT/PEX disabled)
TIME 2012-02-13 17:10:28
BY   qBittorrent v2.9.3

FILE LISTING
chakra-2012.02-Archimedes-i686.iso                                      1.4 GiB

$ lstor Chakra\ 2012.02\ Archimedes\ x86.torrent -q --raw
{'announce': 'http://linuxtracker.org:2710/********************************/announce',
 'created by': 'qBittorrent v2.9.3',
 'creation date': 1329149428,
 'info': {'length': 1531969536,
          'name': 'chakra-2012.02-Archimedes-i686.iso',
          'piece length': 1048576,
          'pieces': '<1461 piece hashes>',
          'private': 1},
 'url-list': ''}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.