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)

3
votes
1answer
911 views

Is it possible to download Apple's Command Line Tools for Xcode from the command line?

Background My job gives me temporary MacBook Pros for travel purposes. I get them with a fresh OS install before I leave, and when I return, they blank the hard drive. The trips usually require some ...
3
votes
1answer
141 views

How to kill the popup in OS X when a disk can't be ejected

With ZFS-OSX, sometimes when I try to force eject my HDD and it's failing, the following popup appears on my screen – floating on the top with all the buttons grayed out – and no possibility to close ...
6
votes
1answer
737 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 ...
1
vote
2answers
83 views

How to make a message appear on the screen?

I'm trying to set up a kind of intercom system between Mac, Windows, and Linux boxes at home. Question: How can I make an arbitrary message appear on the graphical screen of Mac OS X? For instance, ...
0
votes
0answers
127 views

I want to mount a virtual CD-RW drive

I want to export (burn to CD) some media I own and have in iTunes. However, I do not want to burn it to a physical CD. I want to instead burn it to a virtual CD. A virtual CD is something that appears ...
31
votes
3answers
14k views

git auto-complete for *branches* at the command line?

On my linux machine I have autocomplete for branches with git. For example I can type git checkout [TAB] and get a list of branches. Or I can type git checkout feb* [TAB] to get all branches that ...
2
votes
2answers
332 views

Unix command to recursively copy JPG files in a complex directory tree

I have a large directory tree structure that contains multiple JPG files in each directory root and their subsequent subdirectories. I need to recursively extract a single JPG file from each directory ...
7
votes
3answers
13k views

What steps are needed to create a new user from the command line on Mountain Lion?

What commands (or script) can create a fully functional user account on Mountain Lion, running only from the command line via terminal or ssh. It looks like an existing pair of answers might work, ...
1
vote
1answer
2k views

How to install command line tools without error that is not currently available on Software Update server?

I am using maverick, and have Xcode 5.0.2. I am trying to install command line tools using xcode-select --install, but I get message that is not currently available on Software Update server. What ...
4
votes
2answers
132 views

I added this to my .bash_profile but I neglected to label it and forgot what it means exactly

I remember broadly what it does, but not specifically: if [ -f ~/.bashrc ]; then source ~/.bashrc fi What is the exact purpose for it again?
2
votes
2answers
4k views

Restore disk in single user mode

I wonder if it is possible to restore one partition to another in command line? The similar operation can be performed with Disk Utility, but unfortunately I cannot boot in graphics mode (even safe ...
1
vote
1answer
175 views

How to force OS X to give a different IP lease with DHCP?

Is there a command line solution to get a different IP from a DHCP server? There are some solutions, like switching to BOOTP and back to DHCP, that will sometimes yield a new IP, but often the DHCP ...
2
votes
1answer
47 views

Size in bytes is significantly less ( half the size) then size in MB in get info window

In the get info window it says 387,037,139 bytes which is 387 MB whereas the size on disk is 716.9MB which is 716,900,000 bytes. du -sh paramgen result (in MiB) 684M paramgen Why is there such ...
5
votes
2answers
6k views

List all devices connected, lsblk for Mac OS X

In Linux if I want to see all the devices currently connected to my computer in the command-line, I run: lsblk or blkid What's the equivalent command under Mac OS X? NOTE The goal here is ...
0
votes
2answers
91 views

Defaults utility: how to get xcode project info

I have found that utility defaults can get info from .plist file. But how can I canonically pass as parameter to it path to .plist file ? I read about <domain> parameter but still don't have ...
1
vote
1answer
323 views

How to patch a file that resides in /Applications (patch can't find file to patch at input line)?

I am trying to patch 5 files within an Mac application bundle using the Terminal patch command. The files to be patch are specified using an absolute file path (the file name and path start with a ...
1
vote
2answers
157 views

place text over image without imagemagick

I have a png image file which I would like to overlay text onto, via the command line (for use in a Makefile). The text to be overlaid is dynamic, decided at the time the image is modified. I am ...
0
votes
1answer
126 views

Cannot create a file with sudo in Apache web directory

Suddenly the following problem has happened: I have an Apache web directory at /www. Everything was ok with the permissions, but at some point (I can't realize what caused it), I become unable to ...
3
votes
1answer
4k views

Update Xcode from 4.6.1 to 4.6.3 for Homebrew

I have installed Xode downloading the DMG (not from the Mac App Store). Now each time I run brew doctor it says: Your Xcode (4.6.1) is outdated Please install Xcode 4.6.3. But In App Store > ...
1
vote
1answer
45 views

Splitting LexisNexis text file

For my research I have a number of text (txt or doc) files. These have a large quantity of newspaper clippings in them. I'd like to split these text files. Each clipping starts with document X ...
1
vote
1answer
45 views

Linking manuals from Homebrew

Whenever I install a software with Homebrew and I try to view the manual I get an error stating: No manual entry for <name of program>. As an example, wget: when I type $ man wget No ...
1
vote
2answers
459 views

Getting launchd to read program arguments correctly

I have a launchd script where the command I'm trying to run is erroring (apparently that's not a word, it is now), complaining of improper usage. The specific error I'm getting is the command's usage ...
2
votes
3answers
20k views

How to run .exe files on Mac without virtual machine?

I do have one software(.exe) file which I need to run on my macbook pro. For that I need cross platform application just like wine in Ubuntu. Can anyone suggest me the application?
0
votes
0answers
11 views

Command Line Tips and Tricks [duplicate]

==>> What are the most useful Unix shell "one-liners" that you use? <<== Here are a couple of mine to get the conversation started: 1. Repeat the previous command with a substring replacement: ...
1
vote
1answer
556 views

How to copy and paste lines in Nano on OSX

I would like to copy and paste multiple lines in the command line text editor nano on OSX Mountain Lion 10.8.5 Alt-6 and Ctrl-U do not work as on other platforms.
0
votes
1answer
160 views

In iTerm, why is a command shell's command not picking up things on my $PATH?

I've got a script in my ~/.bin directory that changes iTerm's background before starting an SSH session (as detailed here, script slightly modified from this version). If I start a regular login ...
1
vote
0answers
41 views

How can I revoke an applications access to keychain passwords from the command-line?

Applications can be granted permanent unprompted access to passwords. You can add and revoke these privileges using the Keychain Access utility. (See this answer) I'd like to be able to revoke from ...
0
votes
1answer
48 views

Command line open pkg [duplicate]

I am trying to write an app that will trigger an pkg to open so the user can install this. I have the code and it is working well except for the following. When I try to open the pkg file using open ...
7
votes
3answers
280 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 ...
2
votes
1answer
70 views

CLI softwareupdate does not find updates

I can see in the App Store that I have one application (Xcode 5.0.2) that needs to be updated. But if I run the sudo softwareupdate --list in terminal I get the message that there is "No new software ...
2
votes
2answers
799 views

Starting airplay from command line, to send output of 'Say' Mac OS X command to airplay

Ok, Sunday question :) Trying to make a little joke... 1) if you open a terminal, and type "say -a ?", Mac OS X will give you the list of devices it can send spoken words to. On mine, it says: 39 ...
0
votes
0answers
266 views

since Mavericks upgrade: LSOpenURLsWithRole() failed for the application $APP error -10810 for the file $PATH_FILE

I open via CLI a VLC player which plays movie. open -a vlc samantha-jane_HD.mp4 LSOpenURLsWithRole() failed for the application /Applications/VLC.app with error -10810 for the file ...
2
votes
1answer
24 views

CLI to copy to clipboard but still output to term ?

I know that piping to pbcopy copies command line outputs to the clipboard. How can I still show the output in the terminal ?
0
votes
2answers
45 views

Remove symbol link

In terminal, I have made a symbol link like following: ln -s ../../../../ jni/prod It symbol links prod directory (which is 4 levels up from current location) to jni/prod . I'd like to emphasize ...
1
vote
1answer
897 views

Javaws unable to locate JRE on 10.9 Mavericks

From the command line, running javaws results in the message: $ javaws No Java runtime present, requesting install. Unable to locate a Java Runtime to invoke. $ java -version java version "1.7.0_40" ...
6
votes
1answer
380 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 ...
1
vote
3answers
58 views

Open command doesn't like non escaped characters even between quotes?

Is it me or the open command does only accept escaped characters in parameters ? It tried open "~/Library/Messages/Attachments/87/07/079C263B-0586-48C6-B721-3C6AABAC76DF/Messages ...
0
votes
0answers
61 views

How to control application calls / requests for date / time

I'm wondering if it is possible to see how and when applications access the date and / or time given by the computer. If it is possible to see, is it possible to control it? That is, is it possible to ...
3
votes
1answer
964 views

Is there a command-line BitTorrent client preinstalled on OS X?

On a "bare" OS X 10.8 install, what is the easiest way to grab a largish torrent from the command line (MacTeX, 2.3 GB)? I can't use GUI-only clients, it's a headless system. If no such client is ...
1
vote
2answers
85 views

How can I edit a file without altering its modif date?

How can I edit a file without altering its modification date ? In command line. Is vi able to that ?
16
votes
1answer
231 views

Is it possible to get via CLI the commercial name (Lion, Mountain Lion, Mavericks, …)

At the moment I'm using both uname and sw_vers darwin_version=`uname -r` osx_version=`sw_vers -productVersion` But if I want to display the commercial name (Lion, Mountain Lion, Mavericks, ...) I ...
3
votes
3answers
460 views

Is there a htop-on-linux like alternative for top / Activity Monitor on OS X?

I'm looking for a better alternative for top. Both top and Activity Monitor are highly limited with regards to features. In particular, I'm interested in the following features: Limit processes by ...
1
vote
1answer
97 views

Tool to Consolidate Data on Multiple Hard Drives and List Differences Between Filesets

I have several hard drives I've used throughout the years to backup my data. Each one has a different folder structure and fileset. I now have a massive NAS that I want to consolidate all my data ...
3
votes
1answer
455 views

Why setting image as its own icon with sips result a blurred icon? Are there any alternatives?

I've successfully changed icons using the procedure described in an another question: Changing or setting a file or folder icon programmatically. Either my sips (or Finder) got broken afterwards or I ...
4
votes
5answers
4k views

How do I get “wget” for Snow Leopard?

There's no wget command. How do I get it?
6
votes
3answers
163 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
3answers
1k 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 ...
2
votes
2answers
507 views

curl command can't be found, OSX utilities have been replaced by GNU coreutils… how to start from scratch?

I recently installed homebrew and I was having a hard time because I could not install it as curl command couldn't be found, someone pointed me to use wget and that worked to install homebrew but now ...
3
votes
2answers
151 views

Mac OS X UNIX-oriented Tutorial

Is there any Mac OS X tutorial/book that covers the UNIX part of this operating system? Topics like: Managing daemons from the command-line Package management Install/Remove dmg's from the ...
7
votes
2answers
195 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 ...