macOS Terminal History Search

ctrl+r starts the search.

Repeatedly hit ctrl+r to cycle through the results.

Enter executes the current result.

right arrow will insert the current result into the current line.

$ history will display all executed commands.

$ history | grep 'git' will display all commands that contained git.

Download a List of URLs

Follow these steps to download a list of URLs using Terminal on a Mac:

  1. Make a text file with the URLs you’d like to download (one URL per line)
  2. Open Terminal and cd to the directory you’ve saved the text file to
  3. Run this command: xargs -n 1 curl -O < file.txt