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
2answers
130 views

Is the power button on my iPhone being turned off programmatically?

I would like to know if there is a code / glitch to make the sleep/wake button on the iPhone 5/5S to stop working. i am almost 100% certain it exists due to some programmers making the code but i want ...
4
votes
1answer
726 views

Enable/Disable power nap from within Terminal

How can I enable and/or disable OS X's power nap feature from within Terminal? I guess I can deal with it using some command-line programs such as defaults write ... etc, but don't know what the exact ...
5
votes
1answer
157 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 ...
1
vote
1answer
138 views

Locating an app by its bundle identifier from the command line

I am looking for a way to find an app's location on the system from the command line using its bundle identifier. I can open it like this: open -b 'com.zerotier.ZeroTierOne' ... where ...
1
vote
1answer
614 views

Can I run an SQLite operation from Terminal?

When I download transactions in Quicken Essentials for Mac, my bank adds "DEBIT PURCHASE" and other junk to the Payee info. Quicken has no ability to find and replace globally. But I dug into the ...
3
votes
1answer
109 views

pbcopy exits code 1, no error message

I'm trying to use pbcopy and pbpaste to copy and paste to the clipboard from a shell. I read the man page to learn the syntax for these programs. However, no matter how I try to invoke pbcopy or ...
3
votes
1answer
311 views

Command Line: create a link to folder and access files in this folder

I want to do this thing: Create a link to a folder. Put this link in home (~) directory Access files in linked folder from home directory (~/LinkToFolder/file) What is the best way to it? Main ...
5
votes
1answer
235 views

How to access /dev/mem in OSX?

How I can access /dev/mem (or /dev/kmem, /dev/pmap) equivalent device in OSX? As far as I know it was removed in some point. Can I create this node manually somehow or any other way of dumping the ...
1
vote
2answers
130 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, ...
3
votes
1answer
167 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 ...
1
vote
2answers
6k views

How Do I Use 'cp' to Overwrite Files?

Using a shell script or Terminal, how do I overwrite files that may or may not be present. I looked at man page for cp, it said use the -f argument to force overwrite. But, it does nothing. $ cp -f ...
2
votes
2answers
502 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 ...
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 ...
2
votes
1answer
363 views

Fixing two user groups with the same ID

Suddenly, my home directory is in the group messagebus instead of the usual staff.(I blame texlive for this, but have no evidence.) The problem is that both groups have the same ID: $ dscl . -read ...
4
votes
2answers
138 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?
1
vote
1answer
66 views

emulate Linux's `last -x` on Mac OS X

I'm currently trying to get a missing cronjob runner script thing to work, but it was written for Arch Linux, which is pretty different from Mac OS X, and one of the things that it tries to do is run ...
0
votes
1answer
196 views

In Mavericks, is it possible to use Enhanced Dictation from the command line?

A use case is: I have a recording in AIFF or MP3 format, and I'd like a text version of it as Enhanced Dictation would have recognized it if I had spoken it myself.
1
vote
1answer
302 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
50 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 ...
0
votes
0answers
155 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 ...
0
votes
2answers
195 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
605 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 ...
0
votes
1answer
173 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 ...
1
vote
1answer
59 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
65 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 ...
2
votes
2answers
233 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
0answers
12 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
1k 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.
2
votes
2answers
983 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
0answers
55 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
308 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 ...
0
votes
1answer
75 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
441 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 ...
3
votes
1answer
84 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 ...
3
votes
2answers
1k 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
274 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
26 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
1k 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" ...
0
votes
1answer
1k views

May I have a list of “System” group names, and their respective gid(s)?

I know there are group names such as "Staff" and "Admin", but are those the only ones? I suspect that the root user should also be assigned in a group. Using the command dscacheutil -q user tells me ...
0
votes
0answers
70 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 ...
1
vote
3answers
63 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 ...
4
votes
1answer
2k 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
100 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 ?
6
votes
2answers
13k 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 ...
16
votes
1answer
233 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 ...
8
votes
2answers
2k views

How can I install the Command Line Tools completely from the command line?

I'd like to script the installation of the the Xcode Command Line Tools. On Mavericks, xcode-select --install will open a dialog prompting the user to install, but I'd like to trigger the install ...
14
votes
4answers
40k views

Why does OS X Mavericks block the purge command in Terminal?

When I try the purge command on my terminal, OS X Mavericks gives me the following message: Unable to purge disk buffers: Operation not permitted This hasn't been the default behavior until now. I ...
1
vote
1answer
116 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
2answers
220 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 ...