Terminal (or Terminal.app) is the program included in Mac OS X for running applications and issuing commands using the command line interface. These programs are controlled by typing lines of text, rather than using the mouse or keyboard commands in the usual graphical user interface (GUI).

learn more… | top users | synonyms

0
votes
0answers
910 views

Setting Account Picture/JPEGPhoto with dscl in terminal

I'm working on a script based on this question: What steps are needed to create a new user from the command line on Mountain Lion? The script is packaged up in an empty installer as a postflight ...
3
votes
1answer
4k views

How to remap tmux split pane keys?

On my linux machines, for my terminal shell I have tmux keys mapped to allow me to split windows and then switch between new panes. With or without these mappings I can't figure out how to remap the ...
1
vote
0answers
113 views

Correct Way to Check if Spotlight Has Indexed a Folder's Contents

Okay, so I've written a script that uses mdfind to more quickly match files, however, I need to find the best way to check whether a target directory is indexed or not, so I can fall back to using ...
1
vote
2answers
65 views

Forcing a script to run in english

My Mac is running Mavericks in English, but because my region is set to Portugal and my keyboard is the portuguese one, when I run some scripts they shows messages in portuguese. I generally hate to ...
15
votes
2answers
51k views

How can I list my open network ports with netstat?

I would like to list my open network ports in Terminal with built in commands. As what I know, netstat is the command to use. But I'm struggling to get any useful information out of it. How can I ...
5
votes
1answer
824 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 ...
2
votes
3answers
2k views

How can I send email through a Terminal window?

I'm trying to figure out some basic Terminal commands, so I thought I'd try out 'mail.' I opened a Terminal window and entered the following: mail (my email address) (The Terminal then said ...
0
votes
1answer
94 views

ImageMagick convert command produces a slight error

This happens when I convert a GIF into a series of PNG files. I convert a .gif animation to a series of .png using convert ex.gif my_png_files_%d.png I get a series of .png-figures but some of ...
2
votes
2answers
501 views

Terminal.app equivalent of `xterm -e 'cmd'`

With xterm (and gnome-terminal, terminator, etc), you can run the following command: $ xterm -e 'vim somefile.txt' xterm will open and run the specified program (in this case, Vim). When the ...
0
votes
1answer
57 views

Odd bug in iTerm — Why is my name wrong?

I opened up iterm and it says "jessica-s-phone" I'm not sure what the term for that is. I checked my profile and it isn't there.
1
vote
1answer
85 views

Are there any Terminal commands that would be interesting for a young child?

I am beginning to teach my 4-year-old daughter that she can do more on a computer than watch cartoons on Netflix. I want her to know that she can type things on the keyboard and make the computer do ...
3
votes
1answer
3k views

Show Results of Automator-Terminal command

TL;DR If I create a .app via Automator, how can I show results of a shell script in a dialog or terminal window? I am using Automator to run a shell script adb install /Directory/$1.apk and if I ...
1
vote
2answers
148 views

How do I change parts of my terminal prompt? [duplicate]

In Terminal it says Last login: Mon Jan 13 00:00:14 on ttys000 Logsdon:~ DomGomez$ How do I change the DomGomez part in Terminal?
6
votes
3answers
3k views

How to make Mac Terminal restore working directories when restarting

I use the Mac Terminal with a hand full of tabs each assigned to a different working directory. I have configured it to open new windows with the same working directory. Nevertheless, when I am ...
0
votes
2answers
76 views

Run .command with input at runtime

I need to run a .command file with input at runtime, but I want to run via double click, not from terminal. I have a file adbInstall.command file with this code adb install /Directory/$1.apk From ...
2
votes
0answers
65 views

“l/” in shell creates a whitespace

Whenever I type l/ in terminal on OS X (Mavericks), it replaces it with a blank space. I can't seem to find any relevant problems or fixes on Google and I have no idea why this happens. For example, ...
5
votes
1answer
247 views

What is the relationship between `launchctl limit` and `ulimit`?

There is not any ulimit configuration in system startup files/ shell startup scripts. ulimit -a shows: -u: processes 1064 -n: file descriptors 256 launchctl ...
14
votes
4answers
15k views

How can I kill a process by its name?

Sometimes I notice that the process Python hung up. Then I'll kill it via the Activity Monitor and everything is fine. I'd like to kill that process in the Terminal instead. However, looking up the ...
5
votes
1answer
3k views

Using bash/terminal to get number of battery recharge cycles

I would like to get the number of recharge cycles using bash (terminal commands). I understand the following command will display all of the battery data, but I want the cycle count on its own ioreg ...
3
votes
1answer
1k views

Mac terminal command: how to 'ls' for some specific files?

My question is about the ls command. If I have too many files in a folder, I might need either: ls files with a given type only or; ls files within a range, i.e., files with names a* to b*.
1
vote
1answer
53 views

How do I make my list filter in Java usable in Automator as a service?

A friend of mine has written me a small Java application that is used to filter two lists of words (used for work sadly). Currently I would run the application in the terminal like so: java ...
1
vote
1answer
342 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.
2
votes
3answers
3k views

Find all executable files within a folder in terminal

I have a folder myfolder that contains a huge hierarchy of files/folders. How to find all executable files within this folder? On Ubuntu this works: find . -executable -type f But Mac OS X Mavericks ...
0
votes
3answers
1k views

Removing the automatic connection for 802.1X via terminal

So in the spirit of this question I was wondering if it is possible to disable automatic 802.1X connection via terminal as well. Am I right to assume that this is a computer setting (meaning that if I ...
5
votes
1answer
239 views

Launching certain programs on startup in their own fullscreen space

When I login I want a blank desktop in my first space, sublime text in my second space, chrome in my third, and terminal in my fourth space like so:
2
votes
2answers
2k views

manually edit shortcuts on os x 10.9 (Mavericks)

I'm using TotalTerminal on 10.9 Mavericks and while it's not great, it's the best quake terminal I've found right now. I usually show/hide the visor using command-escape but unfortunately can't seem ...
3
votes
1answer
2k views

Terminal problem with Ctrl + Arrow and Shift + Arrow keys

I am running Mavericks on a new Macbook Pro. When I use the Ctrl and Shift keys together with the arrow keys, I get some sort of key codes as output in the terminal. I am pretty sure that this problem ...
0
votes
1answer
511 views

Why can't I navigate to /.ssh folder on jailbroken iPhone 5S

I have installed OpenSSH on my jailbroken iPhone 5S, I am trying to set up ssh keys for it but I need to get to my /.ssh folder. I try to cd there while at root with cd ~/.ssh but it says "not a ...
0
votes
1answer
363 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 ...
11
votes
2answers
2k views

cd to a directory by typing its name?

For example if a directory 'blob' exists and I just type 'blob[return]' then the system cds into the blob directory for me. In Linux (Ubuntu) I can add shopt -s autocd to my .bashrc file, but on OS X ...
11
votes
2answers
1k views

Shell Script for Yesterday's Date

I'm trying to execute the following shellscript with hazel app on any file in the folder. It works, but the only thing thats causing a problem is the date for yesterday. #! /bin/bash saveDir="TJ" ...
1
vote
1answer
3k 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 ...
0
votes
2answers
315 views

How to view previous inputted MAC Address for WiFi network

I have a Belkin Router and accidentally changed the MAC Address for the Wireless Area Network. Is there a way to retrieve previous inputted MAC Address using Terminal? I'm looking around system and ...
4
votes
3answers
2k views

Homebrew warning: “No developer tools installed” even though Xcode is installed

After installing Homebrew the "brew doctor" command returns: Warning: No developer tools installed. You should install the Command Line Tools. Run `xcode-select --install` to install them. …and I ...
4
votes
2answers
5k views

Change compile configuration of package installation in brew

How can I change the compiler configuration when I use brew install? I want to compile vim with +farsi using brew. But it seems that +farsi is not available options in brew: $ brew install +farsi vim ...
2
votes
1answer
140 views

Showing wrong name in terminal

My Macbook's name is 'Suman'. But in terminal I have something different. How to solve it ?
35
votes
3answers
17k views

Is bash in OSX case-insensitive?

Are bash commands on OSX case insensitive? I type "which TR" and it shows /usr/bin/TR, though there is no such binary there. Same thing for other binaries, when capitalized. Or is Terminal.app maybe ...
3
votes
3answers
4k views

Use rsync to automatically copy a file to another folder

I found this command to copy the content of source to a destination folder. rsync -r source/* destination What I would really like is to have this command run automatically each time a file is ...
1
vote
0answers
101 views

Battery value in terminal different to battery value in menu bar

My MacBook Pro Retina is currently reporting 100% battery in the menu bar, however if I run the following command in terminal; ioreg -l -w0 |grep Capacity The following is returned; | | ...
0
votes
1answer
345 views

Execute command on launch of custom Terminal Window in OSX10.5+

I'm trying to find a way to automatically launch a command when Terminal is run, but: Have the Terminal window close after command has returned control to it / after (using &) after command has ...
0
votes
1answer
51 views

Why are the terminal color brighter than the ones I set?

I've changed my terminal's color but, as always, the color I set are rendered brighter than they really are. Here's the proof, I set the exact same color on ST and on my term, you can clearly see the ...
1
vote
1answer
171 views

Strange characters appearing in Terminal

When using Terminal, I sometimes get the following appearing. Last login: Fri Dec 27 22:04:56 on ttys002 ޕ:~ agrimm$ cd ruby ޕ:ruby agrimm$ cd .. ޕ:~ agrimm$ cd ruby/ ޕ:ruby agrimm$ pwd ...
3
votes
1answer
120 views

mac asking password after cd in terminal

Recently my mac has started asking me for a password after I use cd in Terminal.app (haven't tested other term apps). strangely though, if I press ctrl-C when the passowrd is asked, the question goes ...
4
votes
2answers
3k views

How do cope with a space when setting the $PATH

I want to add the sublime lib to my path but it has a space in it. I have tried the obvious like you would navigate in the terminal E.g /Applications/Sublime\ Text\ 2.app/Contents export ...
1
vote
1answer
85 views

OS X Terminal fn+delete doesn't work, prints ~

I recently did a fresh install of Mavericks, and ever since I haven't been able to use the fndelete keystroke in Terminal. On the command prompt, fndelete prints ~ and if I'm in vim, fndelete will ...
4
votes
2answers
3k views

changing the meta key in emacs

I am running emacs 24.3 through the terminal on OS X 10.8.4. I would like to modify the meta-key which is currently set to be the ESC key. I have successfully changed the meta-key from ESC to ...
1
vote
2answers
339 views

What options does Terminal pass to bash on startup?

In the Terminal preferences, I'm able to configure the Terminal to "Open shells with:" -> "Command (complete path):" /opt/local/bin/bash. What options is the terminal passing when invoking this ...
3
votes
1answer
1k 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
3answers
6k views

How do I edit Mac OS X terminal history?

How do I edit my bash history in Mac OS X? I entered a password in that window by mistake and do not want to remove my whole history.
1
vote
1answer
47 views

Open Terminal to a Specific Directory [duplicate]

On Windows I can Shift Right-click in a folder and I am presented with the option to Open a Command Window Here. Is there a way I can do this on my MacBook Air? Or, do I need to open the terminal ...