Get HTTP Header Info from Web Sites Using curl
The easiest way to get HTTP header information from any website is by using the command line tool curl. The syntax to retrieve a website header goes like this:
The command line interface is an alternate method of interacting with macOS and Mac OS X, relying on text based command entry to execute commands and perform tasks. It is accessed on the Mac by using the Terminal application. Generally, the command line is considered advanced, and thus it’s usage tends to be more complex than many standard procedures on a Mac.
The easiest way to get HTTP header information from any website is by using the command line tool curl. The syntax to retrieve a website header goes like this:
Do you need to convert a text file to RTF, plain text TXT, HTML, DOC, or another familiar document format? The excellent textutil command line utility can make quick work of text file conversion and manipulation on the Mac, and there is no need to download any additional software or tools as it’s built right … Read More
If you just want a basic command line mp3 player, you could use afplay, but if that’s not enough for you, install ViTunes. The little VIM plugin gives you full access to iTunes directly from the command line text editor VIM, but don’t be fooled into thinking it’s just a boring old music player, it … Read More
Want to create a new Terminal window from a tab on the Mac? It can be done, but how it works may depend on what Mac OS system software version you are using and therefore what version of the Terminal app is in play. In Mac OS X, the Terminal app reacts differently than Safari … Read More
You can quickly retrieve active DNS server IP addresses on any Mac by using the networksetup utility. This is done from the command line, so launch the Terminal app and type one of the following command strings, dependent on the version of OS X that is running on the Mac.
Sometimes the easiest fix when troubleshooting an AirPort wireless connection problem is to just turn AirPort on and off. Instead of using the menu item or System Preferences, we can enable and disable AirPort very quickly directly from the Mac OS X Terminal.
If you’re bored of the Mac command line this is both cool and geeky and should keep you entertained for a bit. JSLinux is a fully functioning version of Linux running entirely in a web browser, meaning if you have almost any modern web browser suddenly you can run a basic version of linux on … Read More
Instead of disabling the screen shot shadow completely you can take a one-time screen capture minus the shadow by using either the Grab app or by using the command line screencapture utility.
Don’t want to wait for the full screen Terminal in Mac OS X Lion? Me neither, and we don’t have to thanks to iTerm2. The latest build of iTerm2 features the ability to enter into a true full screen terminal mode. Just launch iTerm2 and hit Command+Return to enter into full screen. One of our … Read More
If you’re tired of the antiquated (retro?) text-only appearance of the command line and Terminal.app, check out the fascinating new TermKit project. TermKit aims to bridge aspects of the GUI with the command line, allowing this re-imagined terminal to see anything from icons to images, with progress bars and indicators that commands have executed successfully … Read More
The top command is a great way to get a quick overview of how your system is performing and how apps are using your resources. If you are unfamiliar with it, it’s basically a command line task manager like Activity Monitor and it shows processor usage, memory usage, disk activity, load average, and other helpful … Read More
You can run multiple instances of any application in Mac OS X with a little command line magic. Using the ‘open’ command to launch GUI apps from the Terminal, we can run a new instance of any app, even if it is already running.
Some of the most secure passwords you can use are those that are randomly generated. From the command line, you can randomize potential passwords in a multitude of ways, which can be used as secure passwords of generated characters. We’ll cover several primary methods of generating random sequences and then show you how to combine … Read More
If you like to keep an eye on system resources and you want to branch out from the GUI Activity Monitor, check out htop for Mac. htop is basically a significantly improved version of top, which lets you monitor system resources, CPU core load, memory use, load averages, and view and manage individual running processes. … Read More
Do you have some source code, text, or a command string that you want to securely transfer from one Mac to another? Combining the command line clipboard tools pbcopy and pbpaste with SSH we can do exactly that, and it doesn’t matter where the other Mac is located: be it LAN, WAN, or anywhere. Here … Read More
You can quickly change the appearance of any Terminal window by using the Inspector tool in the Terminal app for Mac, which can be summoned at any time for any specific Terminal window or tab. Inspector is very easy to use, so here is how to change the appearance quickly using it:
Much like you can monitor Mac OS X filesystem usage through the command line, you can also discover what apps and individual processes are currently using your Macs internet connection. This is a really handy trick if you know your bandwidth is being used by something, or if you’re just trying to track down what … Read More
If you don’t want your MacBook Pro to wake from sleep when you open the lid of the machine, all you need to do is launch the Terminal and type the following command: