Download File From Terminal Mac



Will download the file to /home/omio/Desktop and give it your NewFileName name. I use axel and wget for downloading from terminal, axel is download accelerator. The process involves a simple Terminal command, and allows you to continue using your Mac as the update downloads and the initial software installation takes place in the background.

Since macOS is based on Unix there are a number of ways to compress files and folders within the filing system using Unix based application code, below are a few options using the Terminal or command line interface (cli). The default command line application interface in macOS is the Terminal and is stored in /Applications/Utilities.

File and folder compression saves on file size and ensures the contents are captured and delivered or stored as one monolithic file. A compressed file which contains files and folders is generally referred to as an archive. Here are some built-in compression applications you can use including zip, tar, gz, bz2, gz and dmg.

ZIP – Cross Platform

First up is ZIP one of the most commonly used compression techniques used across all platforms

To compress

To extract

If you want to make a zip without those invisible Mac resource files such as “_MACOSX” or “._Filename” and .ds store files, use the “-X” option in the command so:

Mac

TAR.GZ – Cross Platform

Second up is TAR, an old favorite on Unix/Linux – you add the GZ for the compression – compresses tighter than zip

To compress

Download File From Terminal Mac

To extract

TAR.BZ2 – Cross Platform

A variation on TAR GZ but with better compression than both tar.gz and zip.

To compress

To extract

GZ

Without the tar

To extract

DMG – macOS Only

Mac Os Terminal Install Command

This one is macOSnative only – for a GUI interface use /Applications/Utilities/Disk Utility – for command line use:

To create

To mount

To view

To Eject

You can also use a number of different formats for creating a .dmg

  • UDZO – Compressed image (default)
  • UDRO – Read-only image
  • UDBZ – Better compressed image
  • UDRW – Read/Write image
  • UDTO – DVD disk image

That’s the low down, the more common compression packages available will typically be covered in one of the above.

youtube-dl is an Open Source command line tool that lets you download video from YouTube (and many other videos sites). It’s often considered better than those paid video downloaders. In our previous article, we saw how to use youtube-dl to download videos on Android terminal. Even Windows has a YouTube GUI client, there are no such resources available for macOS. So, in this article, we’ll give you a walkthrough on how to install youtube dl on mac. Let’s begin.

Read: 5 best ways to Password Protect folders on mac

Install Os X From Terminal

youtube-dl Installation

1. To install, youtube-dl, you need to install Wget first. And in order to install Wget, you need to install homebrew first. So, copy paste the following command on your Mac’s terminal (press cmd + space and type in terminal). Once you run the following command, you Mac will download Homebrew master file from Github. You may have to enter your Mac’s password several times. The whole process will take 10-15 minutes depending on your Internet speed.

2. Once you have downloaded Homebrew, you are ready to install Wget. Type in the following command and also enable OpenSSL for TLS support.

3. Now that we have Wget to download packages from the internet, we will use it to download and install Youtube-dl package. Type in the following command and press enter.

Download File From Terminal

4. You have now successfully installed youtube-dl on your Mac, however, it won’t work yet. To check you can type youtube-dl on your terminal and it’ll throw a permission error. To fix this, you need to give the right permissions, type in the following command and press enter.

5. And that’s it, now you should be able to download YouTube videos (or any videos from youtube-dl supported sites) by simply typing youtube-dl [video-link]. For example, to download one of my videos from YouTube, I’ll type in the following command.

youtube-dl https://youtu.be/LxTcvc4cgCY

6. You can find the downloaded video in your home folder on your mac. To bring up the home folder simply go to Finder > Go > Home or press the keyboard shortcut CMD + Shift + H.

Must Read: 10 Free macOS apps to boost your Productivity

Download File From Terminal Mac

Download 1080p video using FFmpeg

By default, FFmpeg will download the second highest resolution. You may have to install FFmpeg to get the highest quality video. Without FFmpeg, you will likely get the second highest which in our case was 720p. To install FFmpeg, type in the following command.

brew install youtube-dl ffmpeg

Also Read: 5 ways to transfer files from mac to mac

Wrapping Up

How Do I Download A File From Terminal Mac

Mac

Mac Terminal Move File

So, this is how you use youtube-dl to download videos using your terminal. The app works exactly as advertised, yet not many people know about it. Anyway, if you wish to change your download location or download different resolution of the video, you can check out youtube-dl command line parameters on Github.