Command Line

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.

Search Command Line

See Sizes in Human Readable Format from the Command Line

Jan 25, 2012 - 2 Comments
Human readable format

The default behavior for most command line tools is to show sizes in bytes, for tiny text files that is fine but when you start working with larger items this becomes difficult to read and interpret. The solutions is fairly simple, pass a “human readable” flag with the command, which will convert bytes to a … Read More

Compare Time Machine Backups and List All Changes Between Backups

Jan 21, 2012 - 4 Comments
tmutil compare output

Modern versions of Mac OS X include a great tool called tmutil that lets you interact with with Time Machine from the command line. It’s a powerful utility that has a ton of options, and we’ve used it before to disable local snapshots, but for the purposes here we are going to use tmutil to … Read More

Monitor Disk Activity in Mac OS X

Jan 20, 2012 - 3 Comments
Monitor Disk Activity in Mac OS X

You can monitor disk activity in Mac OS X by using the Activity Monitor app or several command line tools. Activity Monitor is the easiest and most user friendly, but the Terminal options allow further information to be retrieved.

Discover What Apps or Processes are Interacting with a File in Mac OS X

Jan 13, 2012 - 3 Comments
Watch what apps are using a file with lsof or opensnoop

Using the lsof command, we can find out exactly what process or application is using a specified file at that given moment. This is similar to the opensnoop command, but rather than watching the changes to a file over time, lsof can give us a snapshot of this very moment, which can be helpful for … Read More

How to Install Kernel Extensions in Mac OS X Manually

Jan 12, 2012 - 11 Comments
Kext files

Advanced Mac OS X users may find it useful to know that KEXT (kernel extensions) can be manually installed. The process of installing kexts manually into OS X is not too difficult if you’re comfortable with the command line, but it is a multi-step process of copying the appropriate .kext file to the appropriate kernel … Read More

Password Protect Zip Files in Mac OS X

Jan 7, 2012 - 63 Comments
Zip Password in Mac OS X

Creating a password protected zip file is easy in Mac OS X and does not require any add-ons or downloads. Instead, use the zip utility that is bundled with all Macs. This offers a simple way to protect a zip archive file from unwanted viewing access, as when a user attempts to decompress the contents … Read More

Hide Folders in Mac OS X

Jan 6, 2012 - 26 Comments
Hide Folders in Mac OS X

Need to hide a folder or two on a Mac? A while back we showed you how to make invisible folders and to even how to make hidden folders in Mac OS X, but now we’re going to demonstrate how to turn an existing folder into a hidden folder.

Open New man Page Windows from an Existing Terminal in OS X

Jan 2, 2012 - 2 Comments
open a man page from the Terminal in OS X

The Mac OS X Terminal includes a great feature that lets you quickly access new manual pages from any existing Terminal window.

Open a New Terminal From the Current Finder Directory With Go2Shell

Dec 21, 2011 - Leave a Comment
Go2Shell

Go2Shell is a free Finder toolbar add-on that creates a new Terminal window from the current directory of any desktop folder in Mac OS X with a click of a button. This is similar to the services option that can be added to the right-click contextual menu, but Go2Shell is faster due to resting in … Read More

Mount a DMG from the Command Line in Mac OS X

Dec 17, 2011 - 17 Comments
Mount a DMG from the Command Line in Mac OS X

A helpful command line tool called hdiutil is included in Mac OS X that allows disk image files (.dmg extension) to be mounted directly from the Terminal, without the need of using the GUI. Using hdiutil for such a task is helpful for scripting or remote connections through SSH.

Open a Selected Finder Folder in a New Terminal Window

Dec 7, 2011 - 11 Comments
Open a New Terminal from the Selected Folder in Mac OS X

If you shuffle between the Terminal and the Mac OS X desktop often, you’ll get good use out of a Services feature which gives the ability to create a new Terminal window (or tab) from a selected folder within the Finder. You have to enable the Service inside System Prefs beforehand though:

Secure Keyboard Entry Adds More Security to the Terminal in Mac OS X

Dec 1, 2011 - 5 Comments
Secure Keyboard Entry in Mac OS X Terminal

Command line users who wish to add an additional layer of security to their keyboarding within Terminal app can find a helpful privacy feature built into the Mac client. Whether aiming for generally increasing security, if using a public Mac, or are simply concerned about things like keyloggers or any other potentially unauthorized access to … Read More

Access US Only Websites from Outside the USA with a SOCKS Proxy & SSH Tunnel

Nov 29, 2011 - 7 Comments
Setup and use a SOCKS Proxy in Mac OS X

A wide variety of websites and online services are region restricted to the USA: Hulu, Netflix, Pandora, annual credit reports, some banks, the list is significant. Region restrictions are generally something you don’t notice until you need to access a website from outside the USA, and then they’re a huge pain. We’ll show you how … Read More

Enable and Use the ‘locate’ Command in the Mac OS X Terminal

Nov 2, 2011 - 12 Comments
find process running to build locate db

The locate command is very useful if you’re looking to track down every instance of a file, filetype, app, extension, things hidden deep in system folders, or just about anything else that Spotlight can’t manage. It’s extraordinarily useful for troubleshooting and even more mundane tasks like completely uninstalling Mac apps. In order to use locate, … Read More

Add a Separator & Time Stamp Between Terminal Commands to Increase Readability

Oct 3, 2011 - 21 Comments
Custom Terminal separator and timestamp for Bash

If you want to customize the Terminals appearance a bit beyond the prompt and a custom background, you can make the Terminal much more readable by using this nice trick to add a separator and timestamp between each executed command. This also bolds the current command text and anything that is available from tab completion.

Enable Remote Login to Start SSH Server in Mac OS X

Sep 30, 2011 - 18 Comments
Remote Login enables SSH and SFTP

Remote Login is a feature in Mac OS X’s Sharing preferences that allow remote users to connect to a Mac in a secure fashion by using the OpenSSH protocols. Essentially, Remote Login starts an SSH server on a Mac, which includes the ability to accept incoming SSH connections, and is the secure replacement for telnet. … Read More

Start an FTP or SFTP Server in Mac OS X

Sep 29, 2011 - 30 Comments
FTP Server missing in OS X Lion, but you can enable it anyway

If you’ve visited the Sharing Preference panel in the newer versions of Mac OS X you may have noticed there is no longer the direct option to enable an FTP server to share files and folders. Well, at least there isn’t an obvious option, but the FTP and SFTP server function does still exist, the … Read More

Learn How to Use VIM with an Interactive Tutorial

Sep 29, 2011 - 6 Comments
VIM tutorial

VIM is a powerful command line text editor that is wildly popular with developers and system administrators that is accessible by typing ‘vim’ in the terminal. For those that haven’t used it before, it has a relatively steep learning curve, and the interface can be confusing until you figure out how it works and start … Read More

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site