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

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 ...
10
votes
1answer
4k 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
983 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
228 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 ...
9
votes
6answers
19k 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
384 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
598 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
18k 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
32k 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
7k 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 ...
37
votes
3answers
18k 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
857 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
5k 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 ...
4
votes
0answers
752 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
593 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
249 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
662 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
702 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
941 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?
10
votes
3answers
7k views

How do I make Terminal.app's scrollbars disappear in Lion?

Once I upgraded to Lion, I found out that the vertical scrollbar is always plastered to the right side of the application window. Because I run GNU Screen within Terminal.app, the right side of the ...
8
votes
2answers
6k views

Changing Preview.app's default View state in Lion

One thing I dislike about Preview.app in Lion is its defaulting to Continuous Scroll as the view option when a new PDF document opens. My recollection is that previous behaviour was for the last-used ...
1
vote
1answer
105 views

I noticed a .myPassword file in my home folder root. Is this supposed to be there?

I ran "$ ls -a" in Terminal from my home directory and it listed a .myPassword file which contained my user account password. Is this file where the password is stored? It seems like it should not be ...
13
votes
6answers
31k views

How do I find my IP Address from the command line?

I know you can do ifconfig | grep inet, but that shows you several IPv4 addresses. How do I get the specific one for SSHing et al?
0
votes
4answers
1k views

.rvmrc and mac osx lion “restore” issue

Just switched to lion a couple of days back, and juts noticed that when you quit Terminal while in a folder, when you open it, it should be back in that folder(along with your other tabs). This is a ...
2
votes
3answers
1k views

How do I send files from one Mac to another via Terminal?

Is there a way to send a file in Terminal from one Mac to another? If I have a file on Mac A and I want to send it to Mac B via Terminal on Mac A, how do I do this?
7
votes
3answers
2k views

Can Finder and the “open” command treat files with .sh or other typical extensions just like .command files?

I am looking for a way to inject some more extensions into the OS X launch services database systematically so that when clicked, they execute in the terminal app just like .command files do by ...
15
votes
3answers
2k views

Can I make the mouse hairpin in the terminal more visible?

It often takes me a while to find the mouse crosshair when working with Terminal.app. Is there a way to make it more visible?
1
vote
2answers
60 views

'which' location different from executable location

I'm trying to install ruby/rubygems on the latest version of 10.6. I used MacPorts to install ruby after noticing that my version was old. ruby was installed into /opt/local/bin. I changed ...
3
votes
3answers
1k views

Is it possible to automate FTP in Terminal?

I want to add an FTP command to my crontab to automatically download a file. How do I do this?
3
votes
3answers
16k views

Ping all IPs in LAN

How would I find out all the devices on my LAN by pinging them all in terminal? What would the code be?
3
votes
1answer
710 views

Terminal text size different when connected to external monitor

I have a Macbook Pro 15" running OS X 10.6.8. When not connected to an external monitor, launching Terminal looks like this. Note the width of the text (almost looks bold). When connected to my 24" ...
56
votes
2answers
23k views

Open Finder window from current Terminal location?

If I am in a specific path in a Terminal window, how can I open that same window in a new Finder window? Note: This is the opposite of opening a Terminal from Finder.
1
vote
2answers
522 views

Automatically typing a password into terminal

I want to be able to change the password of a disk image, but fully automated. Is there a way to enter a string as a password instead of plain text? Or can I have a .txt file with nothing but the ...
11
votes
3answers
16k views

Will Terminal show a progress bar when I copy with “cp”?

Is is possible to display a progress bar when copying files in Terminal using cp?