歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux上如何查看種子文件的內容

Linux上如何查看種子文件的內容

日期:2017/2/27 15:48:59   编辑:Linux教程

問題: 我從網站上下載了一個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> 

Copyright © Linux教程網 All Rights Reserved