Using programs and commands that do not have a graphical user interface (GUI) but are rather controlled by typing text commands into a terminal program, or shell.

learn more… | top users | synonyms (1)

7
votes
2answers
728 views

“Airplane Mode” in OS X. Alternative command for `rfkill`?

This question is an exact duplicate of this post from superuser.exchange.com. I believe this is a valid question for both of sites and hope I am not (if any) violating stackexchange policies. ...
7
votes
2answers
12k views

how to reinstall xcode command-line tools?

I had serious problems from two versions of Xcode on the same machine. I removed all Xcode app instances & many other non-System 'xcode'-related files, then reinstalled the app (4.6.2), fixing my ...
7
votes
1answer
2k views

Ubuntu-like bash completion in Mac OS X?

I work in the terminal a fair bit, and one thing I really miss from the servers I usually work on is the comprehensive autocompletion bash provides on Ubuntu servers. Are there any readymade tools ...
7
votes
1answer
7k views

How to initiate VPN conection from command line?

I would like to save some mouse clicks and keystrokes by initiating VPN connection from command line. Is there tool for this in Mac OS X? Ideally, it should accept VPN connection name and password and ...
7
votes
2answers
8k views

How does 'stuck' (in results of 'top') relate to 'not responding' (in Activity Monitor), 'spin' or 'hang'?

In results of top commands, I sometimes see stuck. Apple's top(1) OS X Manual Page does not explain this use of the word. How, if it all, does stuck relate to the following? not responding – ...
7
votes
3answers
742 views

copy last command in terminal

I can see last command in terminal by pressing up arrow as in following example: I typed cd /: Makss-Mac:~ maks$ cd / ... pressed enter, command cd / executed and now I can press up arrow and see ...
7
votes
2answers
345 views

How can I process/read checkmarks on a paper form?

I would like to process a large number of scanned paper forms (GUI or command line). I am only interested in reading (custom) checkboxes. The form looks like this: every line has 6 circle-shaped ...
7
votes
2answers
3k views

How to change tap to click using “defaults write” from command line?

I want to change the trackpad tap-to-click property from the command line. Graphically, I can do it by clicking System Preferences -> Trackpad -> Tap to Click. How can I do it from the command line? ...
7
votes
1answer
2k views

Why does it appear that I apparently “do not have access to Command Line Tools” in ML?

I just upgraded to Mountain Lion, and now gcc, make, g++, etc. are not found when trying to launch them in Terminal. So I went to Xcode Preferences, Downloads, and clicked "Install" next to Command ...
7
votes
1answer
342 views

How can I log into the desktop environment as Root on a new mac running 10.6 or 10.7 without creating a user account?

Under Mac OS 10.5, you could boot a fresh-out-of-the-box Mac into single user mode, mount /, set the root password, and touch .AppleSetupDone - this would allow you to log into the desktop environment ...
7
votes
3answers
2k views

Can Finder and the “open” command treat files with .sh or other typical extensions just like .command files?

I am looking for a way to inject some more extensions into the OS X launch services database systematically so that when clicked, they execute in the terminal app just like .command files do by ...
7
votes
4answers
1k views

What's the best way to install command line utilities such as GIT?

I'm a Windows/Linux guy that just got my Macbook Air. I do web dev, and am currently trying to setup this machine for some on-the-go development. After some research attempts, I'm wondering: what's ...
7
votes
2answers
2k views

AirDrop: How to access AirDrop from command line?

I was looking for an option to use Airdrop to sync a set of directories between two computers. I want to achieve this wirelessly(hence chose Airdrop w/o having the computers connect on a network or ...
6
votes
3answers
11k views

How to add user to a group on command line?

With Linux/Unix, I can use useradd -G developers vivek to add vivek to the developer group. How can I do the same thing with Mac OS X? Then, how do I check if vivek is in developers group?
6
votes
2answers
4k views

What is the preferred method of command line domain name lookup (DNS)?

What command line command do I use to lookup a domain address? When looking at the man pages for nslookup and dig I can see a section saying that these utilities do not use the Mac OS methods of ...
6
votes
1answer
7k views

What command combo at terminal will output a list of directories with human-readable sizes?

I'd like to open Terminal.app and enter a command like: my-macbook-pro:~ my-username$ ls -lh Instead of seeing the size of the folders in bytes that are in my current working directory, I'd like to ...
6
votes
6answers
7k views

Improved Terminal autocomplete funcionality (similar to Matlab's)

If any of you ever used Matlab, you might have noticed the command window functionality in that program. I wonder if it is possible to enable the same functionality in Mac Terminal. It works like ...
6
votes
3answers
2k views

Are the OSX Mavericks tags visible from the command line?

For example, suppose I have a directory structure such as /Users /tlehman /Math algebraic_varieties.tex [tagged: Math, Documentation] projective_geometry.pdf ...
6
votes
3answers
3k views

Change the default application (for a file extension) via script/command line?

Is there a way to define the default application for a file extension via an Apple script, command line command (like defaults write [...]). I know that you can change it manually via the information ...
6
votes
3answers
270 views

Terminal command to bring up shutdown dialog?

I know how to shutdown a Mac from Terminal, but is there a way to actually bring up the shutdown dialog you get from Apple → Shut Down…?
6
votes
2answers
257 views

How do I “Get Info” from the command line?

Related to this question: http://superuser.com/q/514528/90435 Via http://osxdaily.com/2010/10/12/find-out-where-a-file-was-downloaded-from/ I find out that you can use 'get info' though Finder to ...
6
votes
1answer
2k views

Completely clear all output from a Terminal window

I would like to clear all output from a Terminal window (including all historical output) to get it back to a clean state as if you had just opened a new Terminal window, or a new Terminal tab. I can ...
6
votes
4answers
1k views

Is there a better way to shutdown/restart OSX?

Whenever I want to shutdown/restart OSX I click on the menu, select shutdown, and then click the box for not saving the session, and then click OK. Then there's always at least one program that ...
6
votes
1answer
4k views

Is there a more-accurate indicator of an app download's progress than what appears in Launchpad?

While downloading an application from the Mac App Store, you are presented with a progress indicator in Launchpad, like so: For a large install (like Xcode, as shown) this doesn't provide a ...
6
votes
1answer
1k views

Adding a song file to iTunes via the command line without playing the file

I want to add song files to iTunes via the command line. open -a iTunes -g song.mp3 does exactly this. - However it starts playing the song, too. Any way to avoid this?
6
votes
1answer
4k views

How to control AirPort wireless radio from the command line?

I want to know how to control (specifically turn off) the networking (specifically AirPort - I want to turn off the radio) from the command line (specifically from bash in Terminal.app, being run by ...
6
votes
4answers
14k views

How to download command line tools in xcode 4.5

I just installed xcode 4.5 and need to install the command line tools. The apple documentations says (with very little detail) that there is a download section in the preferences pane. I have yet to ...
6
votes
2answers
3k views

Child process exited with status 254 error when extracting a tar.xz file

I'm trying to extract a tar.xz file with tar in Mac OS X Lion. I'm using bsdtar 2.8.3 - libarchive 2.8.3. I'm able to use tar to extract anything else I've tried (.zip, .tar, .tar.gz, etc.), but when ...
6
votes
2answers
2k views

How can I kill a process using top on OS X?

On other Unixe,s I can use top and then hit K and type the process ID. How can I do that in OS X? I can type kill [the_pid] on its own at the command line and that works. However, I was wondering if ...
6
votes
1answer
982 views

How can I update iTunes Match from the command line?

I use iTunes Match to access my iTunes library at work. I added some new music to my library (back at home) recently, but I forgot to run the "Update iTunes Match" command to ensure that the songs ...
6
votes
1answer
102 views

Get ambient light sensor value from ioreg

I'm using the ioreg command line tool to try and read sensor information available on my computer (iMac). Particularly, I'd like to read the current value of the ambient light sensor. So far, I have ...
6
votes
1answer
164 views

Software recommendation: Command line network analyser that shows owning process

I'm looking for something that is a mix of tcpdump, lsof, and netstat. I want to be able to filter like tcpdump, but have an additional column showing the process ID. At the end I'd like to be able ...
6
votes
4answers
2k views

How can I set Spotlight metadata to files?

I am looking for a command line utility (I need to use it in a script) that can set Spotlight metadata to files.
6
votes
1answer
190 views

Verify Time Machine Encryption from the Command-Line?

Is it possible to verify whether a given Time Machine volume (for example, returned by tmutil machinedirectory) has encryption turned on? This is for regulatory compliance, so it needs to be fully ...
6
votes
1answer
391 views

How do I emulate Internet Sharing from the command line?

I'm trying to set up my Macbook Air to share an OpenVPN connection for use while I'm on the road and don't want my iOS traffic to go over the open Internet. Sadly, Mountain Lion's Internet Sharing ...
6
votes
1answer
283 views

Incorrect Terminal.app output for long lines with tabs

When I run the following command in Terminal.app: echo -e "a\tb\tc\td\te\tf\tg\tyo" I should get the following output (using a 40-column window so that lines don't wrap here, and replacing tabs ...
5
votes
6answers
3k views

Why use the terminal in daily non-programming life

Disclaimer: I'm a Windows boy awaiting his first mac. I never bothered learning/using command-line interfaces. I've been looking at the Terminal Tips and Tricks topic and I don't see how any of those ...
5
votes
3answers
7k views

Use MacVim as standard Terminal?

I used to love the terminal.app for many reasons. I especially liked the way I could navigate to a file and edit using vim it all in one app, without having to leave the keyboard. But, since the ...
5
votes
6answers
8k views

How to fix curl: (60) SSL certificate: Invalid certificate chain when using sudo

So since the Mavericks upgrade curl has more issues with certificates. When trying to curl a file from my web server with it's self-signed certificate it was getting the error "SSL Certificate: ...
5
votes
3answers
294 views

Detect single-user mode from the command line

Is there a way to detect single-user mode in OSX (Lion, specifically) from the command line? I've tried who -r, which returns 3 in either standard or single-user mode. I've also tried nvram ...
5
votes
1answer
383 views

How to launch TextMate (and probably other software) from the command line?

I am very new to Mac, coming from Linux. I am using TextMate, and I suddenly discovered I do not know how to launch TextMate from command line. Using completion, nothing looks like TextMate. Where ...
5
votes
1answer
4k views

How to remove xattr com.apple.quarantine from all .webarchive files with that extended attribute?

Spread across multiple file system I have numerous .webarchive files that were saved by OmniWeb. So for example: sh-3.2$ ls -@ 2012-03-19.webarchive 2012-03-19.webarchive sh-3.2$ ls -@l ...
5
votes
2answers
8k views

Can't install Xcode Command Line Tools on Mountain Lion

I try to install the most recent (july 25) version of Command Line Tools (xcode44cltools_10_76938107a.dm), downloaded from https://developer.apple.com/downloads/, but are stopped with the error ...
5
votes
1answer
428 views

How can I open a file in its default application from the command line in OS X?

How can I open a file in its default application from the command line? For example if I have a file foo.doc, can I type command ./foo.doc into the CLI and have that file open in Word? Note: on my ...
5
votes
2answers
969 views

Is it possible to get the full suite of unix options for the command line tools on OS X?

I follow Unix Tool Tip on Twitter and it is interesting that many of the tips that are posted are not available on OS X. For example: cp - u will only copy files that don't exist, or are newer ...
5
votes
1answer
552 views

Can I play chess on my Mac from the command line?

If I were feeling insufficiently geekish on any particular day, and thus found the GUI Chess App to lack an appropriate amount of tech credibility, is there a way to play chess on my Mac from the ...
5
votes
1answer
5k views

How do I change back from MacPorts Python to system default version?

I used MacPorts to install a newer version of Python on my system (10.5.8 PPC), and then used the MacPorts select command to change the default invoked version of Python to the MP version. Now I want ...
5
votes
3answers
949 views

How to view man pages in a web browser?

Which .conf file do I need to edit in order to view man pages in a web browser? I'd like to use Google Chrome to do this. Is this possible?
5
votes
1answer
9k views

Is there a Mac OS X equivalent of the Linux iwconfig command?

I'm looking for a command line tool in Mac OS X that performs the equivalent of the iwconfig command in Linux. Example: kirkland@x220:~/src/byobu/byobu$ iwconfig wlan0 wlan0 IEEE 802.11abgn ...
5
votes
3answers
117 views

Can command-line commands be made insensitive to order of filenames and options?

I'm new to Mac usage. It seems that most commands trip over options given after the file names. In linux, which I've used for years, it doesn't matter. On Apple, it does. Is there some setting ...