questions narrowly about terminal.app alone should use this tag. Please consider using **command-line** for any question not specifically about the native terminal app

learn more… | top users | synonyms

1
vote
1answer
1k 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
234 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
2k 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 ...
13
votes
6answers
26k 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
414 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 ...
7
votes
2answers
4k 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
2k 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
639 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
19k 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 ...
10
votes
4answers
54k 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 ...
3
votes
1answer
146 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
2k 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 ...
3
votes
5answers
9k 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 ...
43
votes
3answers
25k 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
1k 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
932 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 ...
1
vote
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
669 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
252 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
2k 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
711 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 ...
14
votes
5answers
15k 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
712 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
996 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
2k 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?
11
votes
3answers
9k 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
106 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 ...
25
votes
6answers
70k 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
2k 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 ...
17
votes
3answers
3k 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
2k 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?
4
votes
3answers
22k 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
840 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" ...
73
votes
3answers
33k 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
607 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 ...
16
votes
3answers
21k 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?
1
vote
2answers
541 views

Where can I find a list of changes to Terminal.app in Lion?

I'm thinking of upgrading to Lion after hearing that they've upgraded Terminal.app somewhat. The main thing I've heard is that Terminal.app now supports 256 colors, but I don't care about colors. I ...
4
votes
2answers
2k views

Is there a way to get the date of the first boot of an old mac?

Is it possible to read the date when a mac first booted via terminal or system information GUI? Maybe there's a file set at this moment.
2
votes
1answer
1k views

Problem setting terminal window bounds with AppleScript

Problem trying to solve I use multiple terminal windows to develop web applications. I'll have a terminal open for vim, a terminal open for git and a terminal open for basic file/directory commands. ...
19
votes
4answers
3k views

Is there a way to suppress badge counts and the dock icon bounce for Terminal.app in Lion?

With the new state saving features (which I want to keep), the dock notifications are more aggrivating to me in Lion. Can I suppress the bounce and/or the notification badge functions? While I like ...
31
votes
12answers
70k views

Password dialog appears when SSH private key permissions are set to 0600

I installed my SSH private key in ~/.ssh/id_rsa and set its permissions to 0600. When I connect to an SSH server which uses my private key in Terminal.app via ssh, a dialog pops up and asks me to ...