How to Download PHP Source from the Terminal with Wget

how-to-download-php-source-from-the-terminal-with-wget photo 1

Downloading files from the PHP mirrors is annoying, because by default the redirector makes the name of the filename change to just “mirror.” So how do you fix this? Luckily wget has a simple argument that you can use to fix it — and it is useful for many scenarios.

Whenever you want to force the output from the Wget command into a specific filename, you just need to use the -O argument (that’s a capital letter o), or the longer version, --output-document=FILE that is a lot of extra typing for no reason.

how-to-download-php-source-from-the-terminal-with-wget photo 2

So to force PHP to download as a specific filename, you would use something like this:

wget -O php-5.5.14.tar.gz http://us.php.net/get/php-5.5.14.tar.gz/from/this/mirror

That line would save the resulting download file from the mirror link to the filename php-5.5.14.tar.gz. You would change the version number for a different version, right? Yes, you would, because that isn’t even the latest version as of this moment.

how-to-download-php-source-from-the-terminal-with-wget photo 3

More stories

How to Track, Disable, and Wipe a Lost iPhone, iPad, or Mac

Apple’s phone, tablet, and computer-tracking tools are the best in the business. You can remotely locate your device, disable it with a lock and message that persists through factory resets — the so-called “kill switch” — and wipe it.

Desktop Fun: Rustic Barns Wallpaper Collection Series 2

Earlier this year we shared a wonderful collection of Rustic Barns wallpapers with you, and today, we are back with more. Journey through the countryside once again on your desktop with the second in our series of Rustic Barns Wallpaper collections.

Windows 8.1: The Rest of Windows 8.1

We’ve arrived at the end of our series and it’s a fitting time to draw back the curtain one last time to see that the desktop is pretty much as you left it in Windows 7. That’s a good thing, and it’s kind of disappointing. On the one hand, the desktop is reliable and staid, on the other, it and the

Windows 8.1: Using the WIN+X Menu for Essential Administration

When Windows 8 was released, users were left confused and wanting for ways to control their devices. Actual guides to how to access the Control Panel were written and, even today, if you’re an established Windows user, the jump to Windows 8 can feel a little disorienting at first.