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)

1
vote
1answer
924 views

Darwin/Linux/Unix command line email client that supports iCloud?

I need to access my iCloud email from a command line. Is there a command line client for Mac OS X (and/or Linux and/or Unix) that can connect to Apple's (I assume it is IMAP) servers?
5
votes
1answer
2k views

Why is a command line change to ~/Library/Preferences/com.apple.LaunchServices.plist not effective immediately?

When the Info window of Finder is used to associate files of a particular type with an application: the preference is effective immediately. When Terminal is used to make a comparable addition ...
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 ...
5
votes
2answers
4k views

How to change the creation (st_birthtime) date/time of a file in Lion?

touch(1) can only change modification and access times, but has no options for creation time. This does not work, at least not on Lion. So how do I change the creation time, also referred to as ...
1
vote
1answer
903 views

Ejecting USB drive via AppleScript does not make drive power down

On startup, I eject my external USB disks with the following AppleScript: try do shell script "diskutil eject \"/Volumes/USB Backup\"" end try This works as expected: the drive powers down. ...
5
votes
3answers
290 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 ...
6
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? ...
1
vote
1answer
320 views

Switching terminal styles in iTerm 2

Recently I've been trying to become more efficient at the command line, and stumbled upon iTerm 2 a couple days ago. One feature of iTerm 2 is that windows can appear from the top of the screen, so ...
0
votes
0answers
2k views

How to remove group membership from user using the Lion Terminal?

How to remove a self created daemon user named '_denyhosts' from group 1025(workgroup), 403(com.apple.sharepoint.group.2), 404(com.apple.sharepoint.group.3) and 405(com.apple.sharepoint.group.4) using ...
0
votes
1answer
2k views

jDownloader-like command line tool or lightweight GUI App?

I use jDownloader which works great, but takes a lot of time to load and surprisingly takes a lot of time also to start and stop downloads. I'd like to have a similar functionality* but with a ...
8
votes
2answers
10k views

How to control Bluetooth wireless radio from the command line?

This question is almost the same as my previous question, but with one major difference; I want to turn on/off Bluetooth from the command line (bash or similar), NOT from AppleScript - the answers for ...
5
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 ...
3
votes
1answer
614 views

Is it possible to open in default browser a URL from command line reusing same tab?

I know that I can use open command to open a URL in a default browser like: $ open http://google.com But what I would like is to execute a similar or same command to open different URLs one after ...
0
votes
3answers
22k views

Access Applications directory in Terminal

I'm really new to command line and I'm trying to access my Applications directory within Terminal. By default, I am stuck in my user directory but Applications is a child of the "Macintosh HD". ...
3
votes
1answer
3k views

Command Line Tools fail to install OSX Lion 10.7.3 Xcode 4.3

I'm trying to install the command line tools to get gcc, make, and other goodies after a Lion upgrade. I went to preferences/Downloads in XCode and attempted to install the command line tools. At the ...
6
votes
1answer
914 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
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 ...
1
vote
2answers
78 views

Save and restore data with command line

I will zip a file with a password. Then, I will write a script and ask: if (have the password saved) { unzip file } else { ask password save password unzip file } I want the user ...
16
votes
3answers
4k views

Can Mac App Store installs & upgrades be automated?

How can I script installing or upgrading apps from the Mac App Store? I'd prefer command line tools, but AppleScript or some other API would suffice. Relevant puzzle pieces: installer: note ...
16
votes
4answers
5k views

How do I speed up new Terminal tab loading time?

How can i speed up the terminal startup in Lion? I'm not referring to the startup of the Terminal application, but to the startup terminal windows, like when i open a new tab. I don't have anything ...
4
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 ...
4
votes
5answers
2k views

Monitor a folder for changes, and run a command when a change is detected

Is there a simple way to automatically run a (Terminal) command every time a file is changed in a specific folder? This should be possible via the command line, or a system built-in application, no ...
0
votes
2answers
364 views

Run java bundled in .app from command-line

The question is how do I run some application written in java and bundled into .app package from command-line? The main purpose of this is to run an application under JDK7. So I will start it with ...
13
votes
2answers
6k views

How can I find the serial number on a mac programmatically from the terminal?

What command can I use to retrieve the system's serial number from the unix command line? As uname will output some information about the software and hardware, I would like to retrieve the serial ...
1
vote
1answer
146 views

macbook - low power from the command line

I often (for example on the train) want to put my macbook into a state that will maximise the amount of time I have before the battery runs out - so far example I'll switch off the bluetooth, then ...
1
vote
1answer
110 views

Make a file a Stationery pad via command line

Is there a way to set make a file into a Stationery pad from the command line? You can do it by clicking "Get info" on a file and checking the box, but I would like to do it without clicking. An ...
2
votes
2answers
136 views

Open app in current directory when another app with the same name exists, from command line

I have an app name foo.app I want to open from command line (using open). My folder structure is like this: ~ +---bar +--- foo.app +---baz +--- foo.app I want to open the app located in ...
4
votes
3answers
2k views

Installing command line GNU utils

I've recently started using MacBook Pro with OSX, after years of developing under Ubuntu. I often use GNU command line tools like make and watch. How do I install these on my Mac?
2
votes
2answers
244 views

How to investigate fragmentation of one file?

I'd like to see if one of my file is "all over the place", ie fragmented in little pieces at different locations on my hard drive. I'm not looking for a software like iDefrag but rather a command ...
0
votes
1answer
501 views

Command line brightness (Lion) [duplicate]

Possible Duplicate: How can I dim the screen from Terminal? Is there a command I can execute to modify screen brightness? Interested to see if the min/max are hardware or software ...
1
vote
1answer
2k views

Foolproof way of extracting .pkg files

I know there are some paid GUI tools that let you do this, but I'm not interested in those. Currently, I'm doing this: gzcat Contents/Archive.pax.gz | pax -r However, there are some pkg files that ...
3
votes
1answer
3k views

Is there a way to minimize open windows from the command line in OS X Lion?

Just wondering if there is a way to retrieve open windows and minimize them from the command line in Lion? I have an AppleScript that does this, but it kind of slow, so wanted to know if there was ...
0
votes
1answer
223 views

NAS recommendation [closed]

I'm wondering if anyone can recommend a 4-bay NAS with AFP/TimeMachine support and the ability for me to install s3cmd (a utility for simple S3 syncing). The reason I ask is simple: just having a ...
3
votes
3answers
2k views

.tar files on OS X Lion

How am I supposed to deal with .tar files with OS X Lion? I'm trying to install Ruby Version Manager, but Lion is throwing a fit about not being able to expand the tar file. This isn't the first time ...
2
votes
1answer
1k views

Open source iSightCapture?

Is there an open source program like iSightCapture?
2
votes
1answer
673 views

How can I kill or refresh Desktop Wallpaper with a Terminal command?

Is there a command for refreshing the Display Settings? Or, in specific, refreshing the Desktop Wallpaper?
4
votes
1answer
2k views

How can I add all users to Print Administrator group but not full administrator?

Gordon Davisson offered a solution to a "standalone user" in another question I'm facing the same issue in an office environment. Printer paused and System Administrator needs to be called to enter ...
1
vote
2answers
619 views

How do you list items with and without labels from the terminal?

Is there a command that can tell the label status (labels as applied in the info menu in the finder cmd+i) of an item from the command-line in OS X? Essentially, I just want to list all the items with ...
4
votes
1answer
282 views

How do I set an icon for a directory via the CLI? [duplicate]

Possible Duplicate: Changing a file or folder icon using the Terminal This is a continuation of this thread from Super User. The question is how to set an icon on a directory. At first I ...
18
votes
5answers
53k views

How can I list all user accounts in the terminal?

How can I list all local user accounts (whether logged in or NOT so 'users' or 'who' is no good) in the terminal on a mac? OS X version is 10.6.8. I have seen this suggested - dscacheutil -q group ...
4
votes
4answers
4k views

Creating a virtual serial port

I'm trying to create a pair of virtual serial ports on my mac. This is fairly easy to do with many shareware programs on a PC. I figured there would be some uber-powerful shell command to do this in ...
3
votes
1answer
565 views

Printing the current date/time with sub-second precision

GNU date(1) understands the %N format spec, which outputs nanoseconds, so: $ date +%H:%m:%S.%N outputs 19:10:03.725196000 BSD date doesn't understand %N. How can I print the current time with ...
1
vote
0answers
211 views

Signals sent to command-line programs when exiting terminal.app

When using tmux, if I CMD-W, or otherwise quite out of terminal, my tmux session persists, as it should. However, it still lists itself as "attached", whereas on other platforms, (e.g. Ubuntu) when ...
4
votes
1answer
214 views

Command line utility to create screenshot

Is there some command line utility to create a screenshot of the my screen and store it as png? (Preferably one in the system, without need to install anything new)
4
votes
1answer
578 views

How do I find the current Mission Control space number from the command line?

Is there any way to determine the number of the currently active Mission Control space/desktop in Mac OS X Lion from the command line?
1
vote
1answer
351 views

Correct syntax for bash grep function?

I'm trying to set up a function to make certain grep command easier. gr() { grep -r --include=*.\{m,h,xib\} $1 \* ; } The end result should be a recursive grep of all *.m, *.h, and *.xib files, for ...
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 ...
10
votes
3answers
1k views

What is the “+” mark at the end of file description?

When I execute 'ls -al~', I see + marks, and it prevents me from moving/deleting files. drwxr-xr-x+ 5 prosseek admin 170 Oct 5 03:43 Desktop drwxr-xr-x+ 17 prosseek admin 578 Sep 25 ...
1
vote
3answers
1k views

Matlab on the command line error in Lion

I constantly get this warning in Matlab, which I run on the command line: This process is attempting to exclude an item from Time Machine by path without administrator privileges. This is not ...
3
votes
4answers
2k views

Using locate.updatedb doesn't work in Lion

A week ago I upgraded to Lion from Snow Leopard. I want to use the locate command, but the locate database has not been built yet. So I tried running sudo launchctl -w ...