Linux 中的 Torrent 内容

May*_*hux 18 command-line bittorrent

如何在 Linux 中使用命令行查看/探索 torrent 文件内容。

我知道我可以使用 GUI,例如transmissionqbitorrent....

这是您如何使用传输获得

这张图片只是一个样本,我不想窃取或复制或任何你称之为任何受版权保护的文件。这只是一个技术问题,这个例子只是一个例子。所以不要因为这个原因投票

在此处输入图片说明

但我需要使用命令行来做到这一点。

Pab*_*abi 27

您可以使用transmission-clisudo apt-get install transmission-cli

这将为种子提供 CLI。您可以使用以下命令显示 torrent 文件的内容:

transmission-show my-file.torrent
Run Code Online (Sandbox Code Playgroud)

要仅显示文件,请使用:

transmission-show my-file.torrent | sed -n -e '/FILES/,$p'
Run Code Online (Sandbox Code Playgroud)

为了更容易使用,将以下行添加到您的~/.bashrc

function tsf { transmission-show "$1" | sed -n -e '/FILES/,$p'; }
Run Code Online (Sandbox Code Playgroud)

你可以tsf用你喜欢的任何东西替换,然后使用tsf my-file.torrent.


May*_*hux 6

最简单的解决方案是使用btshowmetainfo

首先安装bittorrent

 sudo apt-get install bittorrent
Run Code Online (Sandbox Code Playgroud)

现在您可以使用以下方法显示 torrent 内容:

btshowmetainfo file.torrent
Run Code Online (Sandbox Code Playgroud)

我发现 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
Run Code Online (Sandbox Code Playgroud)

显示内容

dumptorrent file.torrent
Run Code Online (Sandbox Code Playgroud)