Tagged Questions

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)

2
votes
2answers
642 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
572 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
142 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
74 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 ...
1
vote
1answer
247 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
512 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
54 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
184 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
306 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
1k 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
217 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
71 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
128 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
308 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
13 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
2k 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
2k 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
84 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
528 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
187 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
692 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
96 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
2k 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 ...
2
votes
1answer
30 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
49 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 ...
2
votes
1answer
2k 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
3k 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 ...
1
vote
3answers
68 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
3k 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
122 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 ?
12
votes
2answers
29k 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
237 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 ...
10
votes
2answers
3k 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
53k 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
143 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
281 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 ...
2
votes
2answers
1k 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 ...
1
vote
1answer
48 views

“open -t” vs. “open -ef”

the Command: syslog | tail | open -ef works perfectly on my osx 10.8.5 and opens the required lines from syslog in textEdit, however when I run syslog | tail | open -t which should open the same ...
0
votes
1answer
424 views

How to manage users access to shared folders from the command line?

Using the sharing or dscl commands I can not figure out how to add users associated to shares. The current local-admin account has access to all shares, but I'd like to add a different user account ...
7
votes
2answers
293 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 ...
0
votes
1answer
75 views

Error Opening Image File in Terminal

Much like: How do I cat a deleted file which is still open by its inode?. I am using 'Sleuth Kit' command line tool, to gather relevant data from the disk. But I keep on getting: Error opening image ...
6
votes
3answers
252 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…?
0
votes
1answer
192 views

Setup a scanner from command line or ARD

I know how to add a networked printer via the command line or ARD (Apple Remote Desktop); and, I know how to install the TWAIN scanner drivers for a particular vendor (again, using ARD). But, what ...
3
votes
1answer
6k views

No GDB in the new Command Line Tools (OS X Mountain Lion) for Xcode - September 2013?

I've recently formatted my Mac and when I reinstalled the command line tools, I installed the new Command Line Tools (OS X Mountain Lion) for Xcode - September 2013. I've just typed gdb in my ...
0
votes
1answer
369 views

Check Camera Path through command line

is that a command to type in terminal that lists all the webcams connected to my computer? Maybe using ffmpeg package?
1
vote
0answers
52 views

Command-line cloud file backup?

Is there a free cloud file server for personal files with shell commands like Unix ls, cp etc. ? Along the lines cloud ls [-options] pattern cloud cp-up pattern cloud cp-down pattern My ideal would ...
2
votes
1answer
90 views

How can I wipe an encrypted volume when the password is forgotten?

I have encrypted disk volume that is in the way and the passphrase is gone. How can I erase the contents and reuse the disk space?
2
votes
1answer
301 views

How can I run a command that requires user input through oh-my-zsh alias?

I'm trying to add Reminder.app items through the command line by invoking an alias. I use the Automator workflow solution from this question: How can I add reminders via the command line?, which ...
23
votes
1answer
31k views

How do I launch Finder from terminal or command line [duplicate]

I use command line a lot, like most programmers. I want to be able to launch Finder, Safari or any other application for that matter from command line e.g. finder . where it will start Finder ...