Site-wide Tags:  Linux(17) | CommandLine(12) | Ubuntu(10) | RemoteAccess(7) | Tools(7) | Vim(7) | LiftWeb(5) | SBT(5) | SoftwareDev(5) | Mac(5) | Scripts(4) | WebDev(4) | Diagrams(4) | Lifty(3) | NetworkDrives(3) | Processwire(3) | Security(3) | Fog(3) | VCS(3) | BestPractices(3) | RaspberryPi(2) | WebDesign(2) | Encryption(2) | Windows(2) | SSH(2) | WinCommandPrompt(2) | GitHubRepos(2) | Emacs(2) | PHP(2) | IDE(2) | ErrorMsgs(2) | JVM(2) | Hardware(2) | Bash(2) | Networks(2) | Graphviz(2) | Cloning | Cygwin | Graphics | Java | SystemRecovery | lessc | Maven | Python | PXE | Samba | LXDE | PackageManagement | LifeHacks | LESS |

This site has been archived and will no longer be updated.
You can find my new profile at My new blog is at

Downloading From Indirect (Script-Based) Links In CLI

Tags:  Linux   RemoteAccess   CommandLine   
Created on Tue, 10 Jan 2012.
Last Modified on Fri, 20 Apr 2012.

Motivation Behind This Cheatsheet

Sometimes file download links are protected by scripts (like at sourceforges "link to current version", for example) so that they can not be directly linked to, or what have you.. I'f I'm working remotely, I prefer to download directly to the box I'm working on. So while wget is good for downloading direct links, it won't work with the script-based links. How can I download them then?

The Cheatsheet

Instead of wget, I open the link with a tex-based command line interface(cli) browser.

My cli browser of choice is w3m because it is distributed (at least) with debian distros.

so all you need to do is

w3m indirect_link_to_file

then when the page loads and the download is ready, the browser will ask you if you want to download the file (to the current path you are in by default).

-press enter and the download will begin.

after it is complete, press q to quit the browser.

use the 'ls' command, and you will see your downloaded file

PLEASE let me know if I'm doing something wrong, or if you have any suggestions or requests~

blog comments powered by Disqus