Linux上如何檢視種子檔案的內容?

Tags: 檔案, 內容, 種子,

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

在Debian、Ubuntu或Linux Mint上

$ sudo apt-getinstall gcc make

$ wget

$ 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

$ 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的完整內容,請新增“-v”選項。它會列印更多關於torrent的詳細資訊,包括資訊雜湊、片長度、建立日期、建立者,以及完整的宣告列表。

$ dumptorrent -v

原作者: Dan Nanni

相關問題答案