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

1
vote
2answers
3k views

Changing the $HOME environment variable in terminal on mac 10.8

To be clear im not looking for a workaround that will execute a change directory command on startup. I want to alter the $HOME env var so that tilde commands work and so that entering a 'cd' command ...
0
votes
2answers
421 views

Reinstall bash on MacOS 10.7

I have a MacBook Air where someone attempted to install this version of bash over MacOS's native one unknowingly. I attempted to fix this by removing the files created by the installer (the readme was ...
2
votes
1answer
211 views

How to open a Finder window even if one is open on a different space already, in Terminal?

I often use open . to open the current folder from Terminal.app. From time to time this doesn't work. The reason is that the folder in question is already open in some other Finder window on some ...
2
votes
3answers
5k views

terminal search files by text that the file names contain

Let's say there a file called "abc_deh.xyz", what command do i use to find the location of that file in mac terminal by using solely the search term "deh"? So, basically, I am asking how to search for ...
4
votes
1answer
1k views

Can't run vi from terminal

Every time I execute these commands: vi or vim in the terminal, it gives me the following error: -bash: /usr/local/bin/vi: No such file or directory or -bash: /usr/local/bin/vim: No such ...
1
vote
1answer
2k views

python site packages directory

I have for some reason two locations for python site packages. Python itself is here: > $ which python > /Library/Frameworks/Python.framework/Versions/2.7/bin/python My Path Variable is: $ ...
1
vote
1answer
397 views

Kill processes automatically that get over x % CPU

I have a (rather annoying) process on my iMac that tends to get out of control. Unfortunately, it's not possible to get rid of it. Much as I want to. This process is fine at first - using 1-2 % of ...
10
votes
4answers
21k views

how do you change mac terminal theme so that it doesn't go back to 'basic' every time you open it

I just can't find any way to change the theme and have it applied permanently. I really need some guidance here, all I want is to change to another darker theme other than the default 'basic' theme, ...
2
votes
1answer
263 views

The safest, most reliable way to move files from drive A to drive B

I am trying to come up with the safest way to move data between two drives, designed to handle the worst possible circumstances. For example: if you were trying to move the only existing copies of ...
2
votes
1answer
183 views

OSX equivalent for ~/bin in Linux

When using Ubuntu I can save shell scripts in ~/bin. To launch them I just type the name of the script in the Terminal. Is there an equivalent solution for OSX?
2
votes
1answer
811 views

OS X Mountain Lion Terminal and tabs take ages to load

When I open a new Terminal tab I have to wait at least 10-20 seconds before I can work with it, I have followed previous suggestions here: How do I speed up new Terminal tab loading time? But so far ...
1
vote
2answers
58 views

drag file from file chooser or get path

Editing a file using text wrangler. Want the path so can pass it to a program in the terminal. Is there an easy way to do this? Don't seem to be able to drag it nor right click and get info. I'm not ...
0
votes
2answers
107 views

Terminal has gone weird after screen sharing

I used screen sharing on my Macbook Pro to remote control my friend's iMac. Unfortunately, now my Terminal now says: kellys-iphone-2:~ James$ Why is it now saying this all of a sudden? Where has ...
0
votes
2answers
402 views

Can I have color ls output automatically if my TERM is “xterm-256color”?

Can I have automatic color output for ls if my TERM environment variable is set to xterm-256color?
2
votes
2answers
258 views

How to prevent Terminal from resizing when font size is changed

10.8.3/Terminal 2.3. Terminal resizes the entire window in seemingly unpredictable ways whenever I change the size of the font -- a frequent operation when frequently going between laptop and ...
1
vote
1answer
624 views

How can I open all the files in all the subdirectories of a folder?

I'm trying to recursively open all the files in a folder, including its directories. I've been playing around with open /path/to/folder/*, and this will open all the files inside that folder but not ...
0
votes
0answers
49 views

Is it possible to check which application has accessed a file last?

I can check when a file was accessed last with ls -lu path/to/file | awk '{print $6,$7,$8}' but can I also see what application accessed it?
26
votes
5answers
16k views

Can I disable Dashboard in Mountain Lion?

I'm wondering if there's a way to disable the dashboard in Mountain Lion. I never use it and I think it's consuming processor and memory powers.
1
vote
1answer
96 views

Making Hidden Apps Appear Faded Whilst Sitting On The Dock?

Sometimes it can be quite difficult for me to tell which of my apps are hidden on the dock and which are not. Is it possible to make those Apps which I have hidden (either by terminal command or ...
1
vote
2answers
336 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...
2
votes
1answer
365 views

preventing ssh command from opening xquartz on every session

Whenever I use ssh, after I type the password, xQuartz pop ups in the dock and terminal window looses focus. This happens even if there's no an X session. Why? How to prevent this behavior?
0
votes
1answer
3k views

Cleaning up my .bash_profile: Can I delete some of this?

I'm not a Unix guru. I'm running OS X 10.8.3 Mountain Lion. Today I removed Macports from my machine. I believe macports left some cruft in my `~/.bash_profile which I would like to remove (the ...
5
votes
3answers
5k 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 ...
1
vote
1answer
8k views

How to remove an environment variable on Snow Leopard

I'm running under Snow Leopard 10.6.8 and I recently added an environment variable which it seems to be messing my bash terminal (I guess). What I did is add the variable ...
0
votes
0answers
136 views

I am having trouble getting apache to work via terminal on mac os x 10.8.3

I am a beginner with the terminal app. - I think , while following a tutorial for creating a user configuration file for apache, that I messed something up internally with apache. I cannot even access ...
1
vote
2answers
9k views

how to move files in terminal osx

Hello world so i am way new to mac i am trying to install an older version of wkhtmltopdf because the brew install wkhtmltopdf installs a rc version that just wont work. So i found this blog that ...
1
vote
3answers
16k views

How can i reset my Terminal?

just some time ago i installed the OS X Server app on my mac and since this day it always appears server as the chosen directory in my terminal. But because i dont really like the Server application ...
2
votes
1answer
1k views

How do I make a bash script so that I can drag its input on top of the icon?

I need to make a bash script to that I can drag a .rar file on top of it and then the script will receive the pathname of that file as argument 1 ($1). I have made the bash script, but how do I make ...
0
votes
2answers
126 views

How to build a simple app that turns text to m4a files

I'm learning Chinese and want a way to quickly generate and save words and phrases to m4a files. I've managed to do pretty much what I want in terminal, but I can't seem to figure out how to make an ...
6
votes
2answers
1k 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
vote
2answers
345 views

Where is the official Apple documentation for the Terminal App? I need a list of escape sequences

Terminal.app does not implement all xterm sequences. I need to get the complete list of what it does implement. Is it available anywhere?
2
votes
2answers
2k views

Check Remote Management Status via Terminal

I need to be able to SSH into a Mac (Mountain Lion) and check if ARD is running and if so, what are the settings. Basically, I need the equivalent of going to System Preferences -> Sharing -> Remote ...
0
votes
1answer
47 views

Cursor does not go begining of the line

Hello I am trying to go begining of the line. neither left arrow key or ctrl + a lets me do it. everytime it keeps couple letters on the right. however its a visual bug my cursor is actually in the ...
5
votes
1answer
4k views

For iTerm2, how do I make the working directory appear in the window title?

I recently switched to iTerm2 from the default Terminal app and have a usability issue. On Terminal, the working directory you are in shows up on the title bar along with the process and pixel ...
0
votes
2answers
887 views

Auto open 4 terminal sessions and SSH them to a given host

I'm doing Rails development on a MacBook via a VirtualBox setup that's somewhat similar to Vagrant. My inconvenience is that I like to have at least 3 terminal tabs connected to the VM via SSH (one ...
0
votes
1answer
307 views

Why does shasum generate non-standard hashes?

As far as I can tell, the shasum that ships with os x doesn't generate the hashes that it's supposed to. $ echo "" | /usr/bin/shasum adc83b19e793491b1c6ea0fd8b46cd9f32e592fc ?- When I look up empty ...
0
votes
1answer
314 views

How do I disable a specific wifi network through terminal?

Is there a way to disable a specific wifi network in Terminal? I'd like to disable my home wifi connection for reasons outlined here: Reclaim Your Life After Work by Disabling Internet Access for ...
0
votes
2answers
2k views

Solarized theme for Terminal

I've installed the Solarized theme for Terminal.app and imported it. But my Terminal is all gray, I don't get color highlighting on anything. Not even running Python terminal generates any color. How ...
13
votes
3answers
3k views

Disable line wrapping for output in the Terminal

I often read outputs in the terminal that get wrapped as they are too long. Since there is no way that I can modify the printed output, I need to let the Terminal allow for horizontal scrolling. Is ...
2
votes
2answers
214 views

Mac Won't Remember Hostname in Terminal After Reboot, gives 'unknown…'

I'm trying to set my hostname for my mac. Currently it's unknown002374e31ebd. I've tried setting it with sudo hostname -s Steve-Mac Which will work for all future terminal sessions. However, if ...
0
votes
1answer
236 views

Can an Open Directory (10.8) user's home directory be changed from the terminal?

I'd like to use SFTP/SSH for users (students and faculty) to manage their web content. The default home directory is "/Users//". I'd like to point them to something like "/Users//web" to block access ...
1
vote
0answers
994 views

FocusFollowsMouse, cut-paste from browser to Terminal in 10.8 (duplicate)

Added: this was discussed in focus-follows-mouse-plus-auto-raise-on-mac-os-x on SO in 2010. In short, accept it, or buy an addon: how-can-i-make-focus-follow-the-mouse-cursor. The sequence: cut ...
1
vote
0answers
3k views

FTP: active vs. passive, command line vs. browser

Here's a weird one for everyone. I'll use AskDifferent because my test bed is on a Mac, but I don't know that the underlying issue is specifically Mac. My Mac is behind a NAT wall. Let's call my ...
8
votes
4answers
2k views

look up a word in Dictionary.app in Terminal

Is there a bash or applescript to look up a word in /Applications/Dictionary.app from a Terminal window ? open -a /Applications/Dictionary.app/ --args word ignores --args, says "type a word to look ...
1
vote
1answer
3k views

Force relaunch of Finder from terminal into background

For some reason, Finder is no longer running and will not relaunch using conventional methods. I can, however, get it running with the following command in the Terminal: prompt$ open -g ...
2
votes
2answers
482 views

How do i autorun .command files from a USB drive when I plug it in?

I've made two .command files, "lock" and "unlock". The first hides hidden files with: defaults write com.apple.Finder AppleShowAllFiles TRUE, then refreshes finder with killall Finder. The second does ...
0
votes
2answers
239 views

(find: *.png: No such file or directory) terminal

I am trying to do some batch processing in terminal with texturePacker. The creator of texturePacker said that this is the way that you batch convert a directory of .pngs to .pvr.ccz. find ...
1
vote
1answer
683 views

mail and mailx fail to send emails to gmail

Quite frequently I have to send the outputs of my work on terminal (e.g. when compiling code) to my colleagues via email. I was wondering if it is possible to pipe (|) the output of a terminal command ...
1
vote
1answer
4k views

Disable Screen sharing via the command line in mountain lion

I want to be able to enable and disable screen sharing from the command line rather than through System Preferences. This is on 10.8.3 To enable screen sharing, I find I only need to change a ...
1
vote
2answers
3k views

“Home” and “End” HotKeys in Vim INSERT Mode with MacBook Pro

I am pretty new to Vim and to Mac, I have a MacBook Pro with Retina Display running OS X 10.8.3, which does NOT have native Home, End, PageUp and PageDown keys. I know the Fn + arrow keys can work in ...