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

7
votes
1answer
1k views

Adding movie-style sound effects to the Terminal

I want to have movie style sound effects in the terminal. You know, when every keystroke and line emits a cool little beep. (Something like this.) I've used KeyClick, but that's only for keyboard ...
6
votes
1answer
219 views

How to keep the text selection in Terminal.app when typing

In Terminal.app, when I select some text and start typing again, the text selection is gone. I personally find this very annoying. Is there a way to make Terminal.app keep the selection when I type?
3
votes
5answers
5k views

Where is nmblookup in Lion?

I'm trying to call nmblookup in a Terminal on Lion, but it's not available. How can I lookup NMB hostnames from the Terminal now?
13
votes
4answers
2k views

Is there a way to get Terminal on Lion to start up cleanly (without the buffered history)?

How can I prevent Terminal from showing me my old output when it starts? I would like it to always start with a clean window.
1
vote
3answers
1k views

I used to be able to use g++ from the terminal, but now it's missing. I still have XCode installed

I used to be able to use g++ from the terminal to compile c++ programs, but now when I try to use it, I get -bash: g++: command not found General advice on the internet was to install XCode, ...
3
votes
1answer
654 views

Password dialog appears for password-less SSH private key

I installed my SSH private key in ~/.ssh/id_rsa. There is no passphrase associated with the key, however, whenever I connect to an SSH server, a dialog pops up and asks me to enter my password to ...
4
votes
2answers
4k views

How to recover .profile on Mac OS?

I have mis-configured ~/.profile while adding new environment variable. I want to restore my original .profile for my Mac OS, I am not mac expert please help me. None of my shell command is working ...
3
votes
2answers
1k views

How can I use tmutil to figure out which files just got deleted?

I'm on Lion and until ten minutes ago I didn't know that the nifty new tmutil existed. But now I'm a little uncertain with all its options and sub-commands which to use to try and figure out what went ...
3
votes
2answers
2k views

Osascript error

I was messing around with some external libraries, and for some reason when I enter any Osascript command, I now get this error (before it did work): 2011-09-07 19:13:43.306 osascript[1083:707] ...
1
vote
2answers
304 views

How can I re-route Cocoa applications through ssh -X?

Is is possible to re-route Cocoa applications through ssh -X? I like being able to route X applications, but I want to route Cocoa applications too. Any ideas?
21
votes
6answers
9k views

How can I quickly navigate through man pages in the Terminal

Is there any way to quickly scroll through text-heavy output in Terminal such as man pages ? Using the up and down arrows only move the screen one line at a time; is there any way to scroll faster?
1
vote
0answers
234 views

Proxy won't work without telnet

This isn't a problem as such, more an irritant that's begging for a clean solution. At work we have a couple of Macs which I'm trying to get integrated nicely into Active Directory. We enforce all ...
3
votes
2answers
4k views

Emacs Ctrl-x ctrl-s command not working in Terminal.app

I am having issue when connecting to my school's unix remotely via Terminal (SSH) and attempting to edit code in emacs on my Mac. I have a Macbook Pro running Mac OS 10.6. I use the emacs that is ...
6
votes
3answers
2k views

How do I make symbolic links invisible in the Finder?

I use SetFile via the terminal to render files and folders invisible inside Finder windows. This does not appear to work on symbolic links: the symlink destination is made invisible, rather than the ...
13
votes
2answers
6k views

What is the difference between .command, .tool, and .sh file extensions?

I saw a couple of questions about executing command line scripts? I saw that the .command and .tool extensions were mentioned. I have always used .sh. What is the difference between these different ...
8
votes
1answer
3k views

How do I send C-/ (that is, control-slash) to the terminal?

I'm trying to run Emacs in a terminal. I've turned on the "use option as meta" in terminal preferences and so it's about 95% working right. The key sequence ctrl-/ (or in Emacs notation C-/) is ...
1
vote
3answers
1k views

-Bash command not found appearing every time I start terminal

every time I start my terminal, it always says "-bash: .: command not found" twice. Does anyone know how I can get rid of that?
4
votes
3answers
7k views

How do I rename the Downloads folder (in Lion)?

For whatever perverse reasons I wish to rename the Downloads folder to Temp. I would also be happy with a way of making it appear to me, in both the GUI and the CLI, as Temp. I am aware I can do this ...
2
votes
2answers
2k views

How can I mount a drive with Truecrypt through a script based on its UUID?

I keep an external drive on my desk at work that I used as an off-site (ie not at home) backup. Because it could easily get taken I have a partition on it encrypted with TrueCrypt. I've got a script ...
1
vote
1answer
958 views

sudo dscacheutil -flushcache = ?Invalid command [closed]

I'm getting the following response when I try and run dscacheutil -flushcache ?Invalid command
6
votes
3answers
227 views

Moving folder to Trash in Finder is not synchronized with Terminal

I tried to delete a folder which I access via terminal.app. Though the Finder moved the folder to the Trash, I was still able to see the contents and edit the file from terminal. created a textfile ...
1
vote
1answer
1k views

Details of the proxy address which is being used by Mac

Is it possible to get the proxy address that my system is currently using in order to populate HTTP_PROXY variable from command line ? I would like a command so that I could set it in my .bashrc ...
8
votes
6answers
17k views

How can I save SSH Bookmarks in Terminal?

I've recently become infatuated with TotalTerminal and am tempted to switch from iTerm back to Terminal just so I can use it, except that I rely heavily on a half dozen SSH bookmarks in iTerm. Is ...
1
vote
2answers
380 views

Is there a way to search my Samsung SCH-R500 phone through a Terminal window?

I have my Samsung SCH-R500 phone connected to my computer via bluetooth. Though when I go to browse in the 'Bluetooth File Exchange' software, nothing comes up. So, I was wondering if I can navigate ...
6
votes
2answers
3k views

What option should I give the sudo command to have the password asked through a graphical interface?

This problem has ben bugging me for a while now. Every now and then, I need to write a script file that should execute sudo commands. I do not necessarily know in advance that I will run as sudo so I ...
4
votes
1answer
1k views

Using screencapture when remotely logged in to a headless mac via ssh

I'm trying to use screencapture from the terminal, when logged in over ssh, to a mac that has no screen attached. I can screen share to the machine, so I'd like to capture the same display. However ...
5
votes
2answers
588 views

Terminal doesn't show badge - how to enable?

Opposite to another question here I want the badge count to appear. I have the "resume" function enabled in my Lion. Is there another setting that's responsible for the badge? To clarify I run tail ...
5
votes
1answer
17k views

How do I remove a user via single user mode in 10.7?

I occasionally will setup a user's machine that has been in for repair beyond the simple re-install of the OS. For example: install a new hd, install the OS, create a user, install updates and then ...
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 ...
8
votes
3answers
27k views

“-bash: ls: command not found”

I installed the most recent update to OS X Lion (10.7). After I did that, my terminal won't recognize normal commands. I typed ls and got: -bash: ls: command not found I figured I'd try to add ...
2
votes
1answer
137 views

Problem with “Open With” menu

I ran this command in Terminal, which supposedly clears all duplicate applications from the "Open With…" menu and now many of my files are just showing up as blank images (.zip files, .dmg files, ...
0
votes
2answers
1k views

Lion Terminal remembers sudo password after quitting

I've been using Lion since its release, and I noticed today, for the first time, that Terminal did not prompt me for a password when I typed in a sudo command, if I close and reopen Terminal within ...
4
votes
3answers
1k views

How do I delete a locked, invisible file in the Trash?

On an external disk (that contains a clone), the /.Trashes/501/Users/myusername/Desktop folder contains (within some subfolders) a locked invisible file that I cannot delete. The whole folder starting ...
1
vote
5answers
6k views

How do I get Terminal to remember previous commands after closing window in SL 10.6.8?

Any way to enable scrollbacks after you quit the window? Even if the app itself is still running, closing the window and opening a new one doesn't work. I am SURE it used to work on my old Mac, but I ...
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 ...
1
vote
2answers
807 views

find video codec from terminal

I'm writing some shell scripts that automatically convert some video files. Except I don't want to run the conversion on files that are already h264 encoded. Is there a way I can tell via a terminal ...
3
votes
5answers
4k views

Why do I have to source ~/.bash_login every time I open Terminal

When ever I close and open Terminal.app, it never loads my ~/.bash_profile. I have my RVM setup at the top of the file but it never loads it. As you can see, when I type rvm into Terminal, it says ...
0
votes
0answers
281 views

PERL is frozen in Mac OS X Lion

I've upgraded to Mac OS X Lion. After that, I've updated MacPorts to the newest version (2.0.1) and updated Perl as the following: [Khang-Le-Nguyens-MacBook-Pro:~] khanglenguyen% perl -V Summary of ...
4
votes
0answers
686 views

Why does my Terminal window close automatically?

I need to use my Terminal window on a MacBook Air but it closes about 10 seconds after I open it. Is there a setting or is it possible another program is causing it to close? If I type quickly I can ...
0
votes
2answers
1k views

How do I get the Mac Terminal to show the gray font color

I am running on a Mac with Snow Leopard. Up until now, the default Terminal.app has served me well. I have installed the IR_Black theme mentioned here: http://blog.toddwerth.com/entries/show/6. ...
1
vote
1answer
579 views

Use only the left option key as meta key in Terminal.app

There's an option in Terminal.app -> Preferences -> Settings -> Keyboard but it allows me only to set both option keys as meta keys. iTerm.app has such an option but don't like that application.
1
vote
2answers
248 views

show battery in prompt and have it update after every command

i just fresh-installed Lion, and i am in the process of seeing up my system. i am using this function (found somewhere online...) to show it in the prompt : battery_status() { maxcap=`ioreg -l | ...
0
votes
2answers
1k views

Disable Terminal's title bar directory on Lion

i was wondering if there was any way of disabling the folder location on the titlebar of the built-in terminal application on Lion. I mean: Any ideas ?
4
votes
3answers
4k views

Showing current directory in Terminal's title, using tcsh

I'd like the title bar of Terminal to always show the directory I'm in. I don't want it shown in the prompt. I found some magic trick code online, and have this in my .tcshrc: set prompt = ...
0
votes
1answer
649 views

Sluggish cursor movement in emacs in Lion Terminal?

On upgrading to Lion, I noticed that cursor movement in emacs (^-N, ^-P and so on) while running in Terminal has become sluggish. Cursor movement in vi seems fine and cursor movement in Emacs.app ...
12
votes
5answers
12k views

Where does $LANG variable gets set in Mac OS X?

I've used wget for the first time after installing Lion OS X and I've noticed that wget got localized to my native language. Running set command in terminal showed that my LANG variable represents my ...
3
votes
3answers
2k views

Where to put the .vimrc file for sudo in OS X Lion?

I always put a .vimrc in my home folder for turning :syntax on. But in OS X Lion it seems that sudo vi foo.txt ignore or can't find this vim configuration anymore. Has anyone experiences the same ...
11
votes
9answers
693 views

Which command-line packages do you need? [closed]

I generally have one of Fink, MacPorts, Homebrew installed. Most often for a single, small, and trivial package. I've found that all my day-to-day software exists in OS X versions. So, which non-OS X ...
0
votes
3answers
896 views

Minimum required ping time for computer on LAN?

I want to ping all possible IPs in my LAN, and I have the code for it, but right now, I've already cut the weight time from 5s to 2s, and it's still about 8 minutes to test them all. How long should ...
1
vote
2answers
1k views

Find information about host IP address?

Is there anyway to ping a computer's IP and find out some basic information about it? Platform, OS, etc... If so, how would that be done?