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.
1
vote
2answers
12 views
Is there a way to set an Application Shortcut in the Keyboard Preference Pane via Terminal?
I'd like to have a bootstrap for my custom keyboard shortcuts to use on multiple machines...
1
vote
3answers
48 views
Change file association in terminal?
Is there a method for associating file types with applications via terminal? I thought ~/Library/Preferences/com.apple.launchservices.plist might do it, and I also have seen: Why is a command line ...
2
votes
2answers
71 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 ...
-1
votes
0answers
49 views
How to compile LaTeX on Mac OS X? [closed]
How can I compile LaTeX on Mac OS X Mountain Lion? I know there are pre-compiled version of the soft that can be found on the Internet, but I actually want to compile LaTeX (to be able to test some ...
6
votes
1answer
121 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?
2
votes
1answer
39 views
Play .ogg on command line
How can I play a .ogg music file on the command line? On Linux I can use ogg123, but what about on Mac?
0
votes
1answer
55 views
How to enable Maven autocomplete on Mac OS X command-line?
When using Maven (mvn) on OS X Terminal, how can I get tab-completion for Maven goals, plugin names, etc? Things like this:
mvn pa [TAB] -> mvn package
mvn je [TAB][TAB] -> mvn jetty:run
1
vote
1answer
57 views
Where do I find the full man page for afplay
In Terminal afplay -h shows full help text but the man page shows hardly nothing.
Is there any way to get a longer help page for man afplay?
I never use Terminal and it would be much easier if i ...
0
votes
1answer
97 views
Temporarily disable Notification Center in Mountain Lion from command line?
I've been trying to create a script to disable/enable the Notification Center, even if it's temporary. It should do the same as manually sliding the Notification Center, scrolling up, and toggling the ...
1
vote
2answers
126 views
Converting Audio to AC-3 using afconvert?
I'm trying to use afconvert to convert an audio file to AC-3 format. It's 5.1 audio, having already been converted from DTS to WAV (using ffmpeg, since afconvert doesn't seem to deal with DTS).
As ...
0
votes
1answer
207 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 ...
1
vote
3answers
235 views
Files synced by Synk Pro have wrong owner on both synchronized Macs – how can I fix it?
I sync some folders within my Home folder between two Macs (running Lion and Mountain Lion) using Synk Pro, a commercial live file sync application. I have the same account name on both computers.
...
0
votes
0answers
64 views
GDB (GNU Debugger) with TUI (Text User Interface, or 'layout' command) on Maountain Lion
Anyone who has tried GDB's nifty layout interface must be impressed by its convenience. Unfortunately, however, Apple developers never realized this, so Xcode, even with its optional command line tool ...
1
vote
1answer
50 views
What does it mean when a process is surrounded by parens in `ps`?
I sometimes try to kill -9 Finder.app when it's misbehaving and I'm in a Terminal. This normally works but every once in awhile it leaves behind the pid, even when run with sudo, and the COMMAND ...
0
votes
1answer
54 views
Why would SetFile be unavailable after upgrading to Mountain Lion?
I have Xcode installed, and have used the SetFile command (installed with Xcode) for some time. I just upgraded to Mountain Lion, though, and find that it is suddenly unavailable. I verified that ...
3
votes
1answer
151 views
Using the apple wireless keyboard with an iPad with PC/Mac-like keyboard commands
I have jailbroken iPad2 (iOS5.1.1) and an apple wireless bluetooth keyboard that I use for typing on the iPad. Although the keyboard is a joy to use, I can't use it for much else other than typing ...
2
votes
1answer
104 views
Controlling iOS apps via command line
I have jailbroken iPad (iOS5.1.1) with the shell utility installed.
I'd like to be able to launch and control applications via the command line, as I would normally do in Unix or Linux. Say I want to ...
1
vote
3answers
137 views
Find/Unrar/Delete Script
I'm a PC convert, and quite novice when it comes to shell/bash scripting, but I really want to learn/understand more.
My need: I need to be able to scan a folder, find any .rar files, extract the ...
5
votes
2answers
294 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.
...
1
vote
3answers
91 views
Can I list files ordered by date added to a folder from a command-line tool like ls?
I need to build a script that shows files in the same order as the default Downloads folder in the dock, ordered by Date Added, newest first. I can't seem to find the option in ls.
Any other way to ...
0
votes
1answer
47 views
PageUp and PageDown keys for Irssi (IRC) in Macbook?
I cannot find the keys on my mackbook. I need them to go page-up and page-down in irssi (IRC). I have tested the tips here but they do not work. They model some different Up/Down, not the traditional ...
0
votes
0answers
21 views
hdiutil(1) and I/O errors: how to debug with “ifd-ignore-io-errors” = 0;
Observation
Debug output from hdiutil (example) typically includes
"ifd-ignore-io-errors" = 1;
In that context, I guess the 1 means that I/O errors are ignored.
The question
If that guess is ...
0
votes
1answer
136 views
How do I install handbrake cli?
I've downloaded the Handbrake CLI. What's the best place to install a command line app on my Mac?
0
votes
1answer
47 views
How can I get tab completion back?
In terminal, if I try tab completion in a directory e.g. Movies, instead of the movies beginning with S (if I type S followed by tab, I see SetFile, Splitforks and SystemStarter. I suspect I installed ...
2
votes
0answers
59 views
“df” command making network requests?
I was watching Little Snitch for another process, and noticed df was making requests to various servers. I thought df was only for checking free disk space locally, but it appears to be doing more ...
1
vote
0answers
413 views
How do I force a partition and format on a USB key in OS X Mountain Lion Disk Utility or from CLI diskutil?
I have a brand new Memorex TravelDrive 64GB USB disk which is being troublesome.
It's formatted FAT16 on MBR, which is not so nice, and I'd like to put it on HFS+.
I've tried to do this through ...
0
votes
0answers
75 views
Adding Ricoh C4501 printer via command line - Installable options
I need to deploy one Ricoh MFP to ~50 Mac users. I thus wan't to do this through ARD/CLI. I'm looking for the correct lpoption tags for the Ricoh MP C4501. I want to set the "Finisher" (SR3020) and ...
2
votes
1answer
95 views
Paste <TAB> into Mac OS X command line
I want to paste <TAB> into command line, in order to execute cut command with <TAB> as the delimiter. Everytime I try to do it, it simulates clicking the tab key and completes the command ...
1
vote
2answers
80 views
Use Cmd as Ctrl key in vim
How can I input commands such as <Ctrl-W> and <Ctrl-]> in vim using Cmd instead of Ctrl? The reason why I want to do it is because it's more comfortable. When I need to switch to a ...
1
vote
1answer
52 views
Backing up individual files with encryption
In addition to local Time Machine backups, I would like to automatically backup my working data from my Macbook to a remote FTP space. Because it's a location I don't control and sensitive data, I ...
2
votes
1answer
75 views
Why do debuggers need an admin password?
Why does running LLDB or instruments require elevated privilages?
1
vote
0answers
156 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 ...
2
votes
1answer
1k 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, ...
2
votes
3answers
208 views
How to determine the absolute path to a file in a shell script
I am writing a generic script that can get passed both absolute and relative (to the current working dir) paths to existing files.
I need a fail-safe way to turn all those passed paths into absolute ...
1
vote
0answers
21 views
How to install Writer2LaTeX in command line
This is the app I want to install, in ubuntu it was done automatically, but somehow in Mac it seems that I have to install manually.
Writer2LaTeX
http://writer2latex.sourceforge.net/
In the ...
10
votes
1answer
246 views
Why is lsof on OS X so ridiculously slow?
I can't figure out why lsof on my Mac (10.8.2, MacBook Pro) is so slow.
On my Mac, lsof takes more than a minute:
$ touch /tmp/testfile
$ time lsof /tmp/testfile
real 1m16.483s
user 0m0.029s
...
0
votes
0answers
18 views
How can I toggle internet sharing from the command line? [duplicate]
Possible Duplicate:
Start/stop internet sharing from a script?
There are applescripts / automator scripts that help to turn on / off internet sharing, but they do not work consistently ...
2
votes
6answers
411 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 ...
3
votes
1answer
549 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 ...
0
votes
1answer
654 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 ...
6
votes
9answers
780 views
Lock Screen Command One-Liner
I'm trying to find out whether there is any kind of equivalent command line one-liner which replicates the exact identical functionality of the 'Lock Screen' menu option available via the Keychain app ...
0
votes
1answer
61 views
Set Keystroke for Service from Terminal
I created some services to be used in Finder. Now I wanted to create some keystrokes to call these services. That would be easy in the System Settings, however, I would like to add them from the ...
0
votes
1answer
362 views
Can not successfully re-install MYSQL 10.8.2
Removed the old installation as explained here:
http://superuser.com/questions/129193/how-do-i-uninstall-mysql-on-mac-os-x-snow-leopard
Installed the package contained in the mysql 5.1.67 DMG ...
0
votes
0answers
101 views
Mounting a Flash Drive in Single User Mode
I am planning on copying over and viewing some files on a Mac of mine, namely they are in the system folders. I have done a TON with the UNIX command line, and I am acquainted with Single User Mode. ...
1
vote
1answer
59 views
What's the difference between device file and its raw version?
It's convenient to use dd to write image file to USB sticks. But I find sometimes people write dd of=/dev/disk1 and there is alos dd of=/dev/rdisk1.
e.g.
The arch wiki
dd if=image.iso ...
3
votes
0answers
74 views
How do I monitor the total physical and virtual memory usage of a process and all of its descendants?
From the command line, how would I get the total physical and virtual memory usage of a process and all of its descendants (not just 1st-level children)?
This is useful when you want to monitor the ...
0
votes
0answers
77 views
Use asr and/or mount to image a mac with a dmg located on a network machine
I don't have OS X Server and want to image a mac over my network. I've been attempting this through the terminal inside the recovery console (can't boot into the OS). I have the dmg which I packaged ...
3
votes
1answer
140 views
Within Terminal, `date` command outputs a curious prefix where it should'n
I am using a Mac Mini running Lion (10.7.5) and zsh 4.3.12 (i386-apple-darwin11.0.1) with oh-my-zsh installed. In the Terminal.app I retrieve the UNIX timestamp using the following command
date +%s
...
0
votes
2answers
219 views
How to set alternatives in 10.8?
On Linux you can use update-alternative to change the version of a command.
Which command in OS X (10.8) will switch the alternative of the current command?
1
vote
0answers
141 views
Resource efficient way to monitor file change and execute shell scripts on change
I know at least three ways to monitor a folder/file for changes and execute a shell script on change.
First, use "Folder Actions" of Automator
Second, the launchd.plist approach but it seems the ...


