Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2000 links of .torrent files in .txt file in the following format:

Each link is on a newline.

I used wget -i /path/to/file_of_torrents.txt.

It downloads the files but for some reason no file is able to be used. They are not in right format, perhaps. I don't know what the problem is with them.

But if I paste any link manually in a web browser it downloads perfectly in the right format to be used in a bittorrent client.

What is going wrong?

Additional Information

If i open the file in bitorrent client nothing happens bittorent client cannot read the file. and if i see the source its encrypted and i dont see it as like a normal torrent file because in normal torrent file it has links of anounce.php and servers but if i download it from wget i can read anything in source here is the example

source file downloaded by wget

\C0\C9mdcc\EBlcl\C2\CC\C2\ED\B0\E3f`pr02\B62q\A0766\A6\98ps22\B1\FC\88h\E1\E8\FE\DFX 3\FB\FF\CA\FDe\D8M\E8-\9C\FE\99f\E1\E06wr\FA\F7\BC\9D\F3O\A0\85\F1O'zc[kF\86\FFt\FA\8Bd\FB_B\B6v&6?-\9C\9ClLl\FE   \FF\97"\F3\FFU̿\8B1\FEo\DB\A1\FE\C2\F9\BFt\FE\BD\B0\FF\A5\C6\FE\FF\B6\88\FF\A9\F9@7[\80\B3\E3_GGw\E3*\B2s\B1s\FD;\F4?\97\E1\EA\EAJo\CE\C2\F2/[\A636\E1\E0\FE\B4\FE\BBz6.n\D5\ED1\C0\D6\D5hk0\9B:\D8Z\FF\C7\FE\9B\9B9\FFg\A9\E3Ff&\FF\90eb\E46v01r\FAK\F9\E9\FE\B7#\CE\FF)F\A5(\A9H,4rt$\A6#8X\98\D8KX\FCt0r\A2\FE{\FEI\B2\B0\B5!\FC\E5Z0\B1\B03\B22s\B0\B3r\99pr\9B\D8\DB,l\CCظ\D5T\C5\E98Y\B9-lLm9\A6@:\80\B3\C3?\89@V.f\C6\FF~M\FE\F3O\8C\B5  \C0\C2\F8\8F \D3\FF\F8L\D8\FE

Source of same file downloded from web browser

d8:announce23:udp:// downloaded from torrent cache at http://torrage.com10:created by37:ruTorrent (PHP Class - Adrien Gibrat)13:creation datei1360427649e8:encoding5:UTF-84:infod13:file-durationli4927ei0ei0ei0ei0ee10:file-mediali0ei-1ei-1ei-1ei-1ee5:filesld6:lengthi737021634e4:pathl26:s4a-tpb.afk.hdrip.xvid.avieed6:lengthi4239360e4:pathl4:Subs26:s4a-tpb.afk.hdrip.xvid.subeed6:lengthi40513e4:pathl4:Subs26:s4a-tpb.afk.hdrip.xvid.idxeed6:lengthi4986e4:pathl26:s4a-tpb.afk.hdrip.xvid.nfoeed6:lengthi353e4:pathl44:Torrent Downloaded From
share|improve this question
What do you mean when you say that no file is able to be used and that they are not in the right format (when you use wget -i)? What happens when you try to use them? What error do you get? Please provide more details (by editing your question). Thanks. – Eliah Kagan Feb 11 '13 at 14:18
Also, what happens if you just try downloading a single file with wget, by giving the URL on the command line (i.e., not by using -i)? Is that file usable? – Eliah Kagan Feb 11 '13 at 14:41
@EliahKagan same results weather i use -i or not – Yousaf Ehsan Feb 11 '13 at 14:59
I tried downloading single file but the results are same – Yousaf Ehsan Feb 11 '13 at 15:00
This is strange. I'm able to reproduce this with wget, and with curl also (both with and without the -L flag), which suggests strongly that it's not a bug in wget. – Eliah Kagan Feb 11 '13 at 15:10
up vote 5 down vote accepted
  1. wget -O test.gz && gunzip test.gz
  2. more test.gz


d8:announce23:udp:// 0el26:udp://

  • rest deleted since most of the content seems not to be allowed ;)
  • The file you downloaded is zipped. gunzip does not unzip .torrent so I added a -O and a gunzip

How about these 4 commands for all files:

cd /path/to/
wget -i file_of_torrents.txt
rename.ul torrent torrent.gz *.torrent
gunzip *.gz

Just make sure you work in an empty directory (otherwise files might get renamed or gunzipped that are not intended to).

share|improve this answer
yes exactly goal is to download 2000 files how can we use this command to download the files from .txt file ? – Yousaf Ehsan Feb 11 '13 at 15:38
aweeeeeeeesommmmmmmmmeeee thattttttttttssss ittttttttttttt you are masterrrrrrr salute to rizwind – Yousaf Ehsan Feb 11 '13 at 16:02
you made me blush @YousafEhsan :+) – Rinzwind Feb 11 '13 at 16:04
Thankd to Rinzwind and Eliah KAGAN :) – Yousaf Ehsan Feb 11 '13 at 16:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.