Linux 上如何查看种子文件的内容

发布于 2024-09-07 10:10:20 字数 2228 浏览 12 评论 0

问题 : 我从网站上下载了一个 torrent(种子)文件。Linux 上有没有工具让我查看 torrent 文件的内容?例如,我想知道 torrent 里面都包含什么文件。

torrent 文件(也就是扩展名为 .torrent 的文件)是 BitTorrent 元数据文件,里面存储了 BitTorrent 客户端用来从 BitTorrent 点对点网络下载共享文件的信息(如,追踪器 URL、文件列表、大小、校验和、创建日期等)。在单个 torrent 文件里面,可以列出一个或多个文件用于共享。

torrent 文件内容由 BEncode 编码为 BitTorrent 数据序列化格式,因此,要查看 torrent 文件的内容,你需要相应的解码器。

事实上,任何图形化的 BitTorrent 客户端(如 Transmission 或 uTorrent)都带有 BEncode 解码器,所以,你可以用它们直接打开来查看 torrent 文件的内容。然而,如果你不想要使用 BitTorrent 客户端来检查 torrent 文件,你可以试试这个命令行 torrent 查看器,它叫 dumptorrent

dumptorrent 命令可以使用内建的 BEncode 解码器打印出 torrent 文件的详细信息(如,文件名、大小、跟踪器 URL、创建日期、信息散列等等)。

安装 DumpTorrent 到 Linux

要安装 dumptorrent 到 Linux,你可以从源代码来构建它。

在 Debian、Ubuntu 或 Linux Mint 上:

$ 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 

在 CentOS、Fedora 或 RHEL 上:

$ sudo yum 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 

确保你的搜索路径 PATH 中 包含 了/usr/local/bin。

查看 torrent 的内容

要检查 torrent 的内容,只需要运行 dumptorrent,并将 torrent 文件作为参数执行。这会打印出 torrent 的概要,包括文件名、大小和跟踪器 URL。

$ dumptorrent <torrent-file> 

要查看 torrent 的完整内容,请添加“-v”选项。它会打印更多关于 torrent 的详细信息,包括信息散列、片长度、创建日期、创建者,以及完整的声明列表。

$ dumptorrent -v <torrent-file> 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

关于作者

傾旎

暂无简介

0 文章
0 评论
20 人气
更多

推荐作者

花开柳相依

文章 0 评论 0

zyhello

文章 0 评论 0

故友

文章 0 评论 0

对风讲故事

文章 0 评论 0

Oo萌小芽oO

文章 0 评论 0

梦明

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文