3

I want to be able to download specific file from a magnet/.torrent (not all the files) using a cli client for my headless server. I know that GUI clients usually have this option but was looking for a command line tool.

Though this question answers on the options available, it doesn't cater to this specific question

user
  • 43
  • Unless its a super large file would it not be earier to DL all of it and delete the parts you do not want? – David Feb 20 '21 at 15:46
  • @David downloading all of it will not only take more time but also eat on my bandwidth – user Feb 20 '21 at 15:48
  • I've not used it myself but transmission has a CLI tool and it should be part of the Ubuntu repositores: sudo apt-get install transmission-cli Once installed see man transmission-daemon and manman transmission-remote` – codlord Feb 20 '21 at 15:49
  • @N0rbert unfortunately, no. have updated my question to reflect that. thanks – user Feb 20 '21 at 15:50
  • does transmission remote work with no gui on the Ubuntu machine? – David Feb 20 '21 at 15:59
  • Both Transmission and Deluge can easily be used on headless servers. Generally, beginners find the web interface easier than the curses interface or the shell interface, but all are readily available. I find that selecting a specific file from the torrent is easiest with the web or curses interfaces. – user535733 Feb 20 '21 at 16:48

1 Answers1

2

Selecting individual files using the command line is a feature of the transmission-remote command, provided by the transmission-cli package.

Let's take a look at that command's manpage:

-f --files
   Get a file list for the current torrent(s)
-g --get all | file-index | files
   Mark file(s) for download. all marks all all of the torrent's files for 
   downloading, file-index adds a single file to the download list, and files 
   adds multiple files to the download list, such as "-g1,3-5" to add files 
   #1, #3, #4, and #5 to the download list.
-G --no-get all | file-index | files
user535733
  • 62,253