Torrent content in Linux

Solution 1:

You can use transmission-cli: sudo apt-get install transmission-cli.

This will provide a CLI for torrents. You can show the contents of a torrent file with:

transmission-show my-file.torrent

To show only files use:

transmission-show my-file.torrent | sed -n -e '/FILES/,$p'

For easier use add the following line to your ~/.bashrc:

function tsf { transmission-show "$1" | sed -n -e '/FILES/,$p'; }

You can replace tsf with whatever you like and then just use tsf my-file.torrent.

Solution 2:

The Easiest solution is to use btshowmetainfo

First install bittorrent

 sudo apt-get install bittorrent

Now you can show the torrent content using:

btshowmetainfo file.torrent


Another solution I've found DumpTorrent

sudo apt-get install gcc make
wget http://downloads.sourceforge.net/project/dumptorrent/dumptorrent/1.2/dumptorrent-1.2.tar.gz
tar -xvf dumptorrent-1.2.tar.gz
cd dumptorrent-1.2
make
sudo cp dumptorrent /usr/local/bin

To show The contents

dumptorrent file.torrent


Solution 3:

You can also use lstor from pyroscope/pyrocore.

Just follow the installation instructions to install the command line tools.

To get the file list use the following command:

$ lstor -qo info.name ~/Downloads/ubuntu-14.04.2-desktop-amd64.iso.torrent
ubuntu-14.04.2-desktop-amd64.iso