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

3
votes
3answers
5k views

How can I use Terminal to copy all files of a certain type from a failing hard drive?

I need to use terminal to copy my Pictures folder from a failing harddrive onto another drive, but I can't actually change into the folder and use just cp *.jpg ~/Documents. Is there a way to do this ...
4
votes
4answers
7k views

Dig not returning authority section?

Digging wikipedia.com, on my Macbook Pro, returns: $ dig wikipedia.com ; <<>> DiG 9.8.3-P1 <<>> wikipedia.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<...
3
votes
1answer
434 views

Reload menu bar from terminal (not SystemUIServer)

I am looking for a way to reload/refresh the "apple symbol" menu in the upper left corner from the terminal. Searching for ways to refresh the menu has only led me to find the command killall -KILL ...
1
vote
1answer
621 views

Permission denied error when opening Terminal

I'm using a clean install of 10.8. I wanted to add a couple of directories to my path. I tried adding them to /etc/paths using sudo vim /etc/paths Now when I open a terminal window I see this: ...
3
votes
1answer
252 views

Downside of manual shutdown

I've been using shutdown -h now in the terminal to turn off my iMac (sooo much faster than waiting for every program I use to close out), and I wondered if there were any downsides to shutting down ...
1
vote
1answer
7k views

Access applications and their folders from terminal

I have a folder that I want to init with git, but to do that I have to 'navigate' to that folder using cd. The problem is when I write cd Applications, that folder is empty and I cannot go into ...
7
votes
2answers
15k views

Editing System Preferences via Terminal

Am looking to edit system preferences settings via the command line but cannot for the life of me find the correct names of variables. In Login Options under Users & Groups, I would like to be ...
-1
votes
1answer
3k views

How to add a script that types in the password for my vps through applescript

I made a script recently and have turned it into an app, it basicly logs me into my vps via ssh but I don't know how to tell it how to type in my password for me, heres the code tell application "...
0
votes
1answer
556 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 ...
1
vote
1answer
651 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 ...
7
votes
5answers
19k views

How to reset $PATH?

I was trying to add something to $PATH and it went totally wrong. I now can't run any commands such as ls. I've looked at this answer and used the following lines: PATH=/usr/bin:/bin:/usr/sbin:/...
2
votes
1answer
2k views

Editing war file with Midnight Commander

I'm trying to edit the contents of a war file on midnight commander (Mac OSX). With a normal zip file, this works fine. However, when I try to open a war file, I get an error message: gzip: stdin ...
0
votes
1answer
184 views

TimeMachine restore issue

Times ago I did a "restore from time machine backup" in order to restore all my files on a new SSD I bought for my macbookpro (with OSX Lion), and all went fine. Today I installed Mountain Lion on ...
3
votes
1answer
1k views

What terminal is the Mountain Lion Terminal app emulating?

I recently migrated from 10.6 to 10.8. I use Terminal to connect to various linux boxes where the TERM variable is observed to be xterm-color. This seems to be consistent with the 10.6 setting of ...
0
votes
1answer
827 views

Unable to ping any website through terminal and network utility

I have internet connection and I can access every website. But when I try to ping any website ( be it www.google.com or www.stackoverflow.com or any site ) I always get Request timeout for icmp_seq 0 (...
0
votes
3answers
550 views

Permanently show hidden directories

I am trying to repair a friend's USB drive that got a virus. All directories became .lnk and the original ones were hidden. I don't know how to permanently show the folders. I've used sudo chflags ...
5
votes
1answer
603 views

I got an image on terminal from the output of homebrew package manager

I got a strange image from the output of brew like this . I'm curious about this behaviour. Is this a feature of brew or the image comes from some special character set? If a character in some ...
1
vote
2answers
324 views

Does anyone know a decent app to monitor bandwidth usage, ideally from the terminal?

I'd like to monitor my bandwidth usage on my Macbook pro, and keep logs of it. Ideally, I'd like to view/monitor them via the Terminal. Can anyone recommend me some applications? EDIT: To clarify, I ...
1
vote
1answer
79 views

creating a new user in Mac will it reset everything?

I want to reset all my configurations trying to install MySQL & other development stuff through the terminal on my Macbook and start fresh. Cause it was my first time do this & I think I made ...
3
votes
1answer
917 views

Create a default folder structure & insert current Date in Terminal by single command?

I often find myself creating the same structure by hand in finder for new projects, how can I quicken this process with a single Terminal Command? Example of structure & command: Terminal $ cf ...
0
votes
1answer
5k views

Can't install Homebrew on MacBook Pro, password field won't input

I need to install Homebrew. I am unable to input the password when prompted in the Terminal - nothing happens when I type, only when I hit enter. I follow the instructions specified in the book I'm ...
1
vote
4answers
1k views

How can I extend the time when system.log gets turned over?

Right now my system.log gets recreated every 24 hours or so with a message like: Jan 4 00:30:01 Mac newsyslog[63416]: logfile turned over Can I change a setting such that it will get rotated every ...
5
votes
2answers
20k views

Console reports “sandboxd deny mach-lookup” … Should I modify system.sb?

I'm getting two errors in the console at the same time TimeMachine is running and taking FOREVER to make any progress. 1/4/13 9:41:38.000 PM kernel[0]: Sandbox: sandboxd(5838) deny mach-lookup com....
3
votes
1answer
242 views

Within Terminal, `date` command outputs a curious prefix where it should'n

I am using a Mac Mini running Lion (10.7.5) and zsh 4.3.12 (i386-apple-darwin11.0.1) with oh-my-zsh installed. In the Terminal.app I retrieve the UNIX timestamp using the following command date +%s ...
1
vote
0answers
415 views

Resource efficient way to monitor file change and execute shell scripts on change

I know at least three ways to monitor a folder/file for changes and execute a shell script on change. First, use "Folder Actions" of Automator Second, the launchd.plist approach but it seems the ...
0
votes
1answer
341 views

Is it 'ok' to delete zsh's *.asl logs?

I do a lot of work in the terminal. Sometimes, after a week or two, start up gets a bit slow (I'm talking about an extra second or two, not the end of the world but it's slower). I did some Googling ...
1
vote
1answer
415 views

How do I verify the integrity of my OSX installation? (Files, versions, and preferences)

I want to verify the files, and configuration settings for my OSX installation against a known good reference "base". Assuming I have two identical Macs (hardware), with one being factory installed ...
4
votes
1answer
4k views

whoami is not who I am!

I login into my own computer as username geoff. When I open a terminal I have as prompt: Geoffs-MacBook-Air:~ org1$ The org1 is my work username! I have no login of that username for this computer ...
8
votes
1answer
2k views

Why does the folder icon in my Terminal have a question mark overlaid?

From time to time, I spot that the folder icon in the titlebar of one of my Terminal windows has a question mark overlaid on it, e.g. this one: What does this mean? It doesn't seem to have any ...
10
votes
1answer
2k views

how do I get Terminal's Search with Google to open in the default browser?

Scenario: working away in Terminal, get an error message. Want to google it so I select text and use right-click and "Search with Google". Opens Safari every time. Google Chrome is my default browser. ...
1
vote
1answer
558 views

“DYLD_” terminal error? [duplicate]

So, I've done some searching.. and still haven't found a solution for this. I'm not even sure what has caused it. There are no DYLD_ or LD_ flags being set at all, but I always see this when I open ...
12
votes
3answers
13k views

Can Gatekeeper be disabled via terminal in OS X 10.8 Mountain Lion?

How can you disable Gatekeeper via Terminal Commands in OS X 10.8 Mountain Lion? I am looking to replicate the Security & Privacy preference pane selection to allow applications downloaded from ...
0
votes
3answers
2k 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 ...
2
votes
2answers
1k views

Can a Mac boot when the right shift key is broken in the pressed position?

Here's the thing, the right shift key of my macbook is stuck, so it always boots in safe mode once I turn the machine on. Worse, I cannot log in since my password has lower case letters. I tried ...
3
votes
1answer
941 views

I want to change clock from 12h to 24h mode via terminal

So I'm looking for the command to change from 12h to 24h. Is there even such a command? I mean I can do it with the GUI but I need to be able to do it via terminal so I can put it in a bash script. ...
0
votes
1answer
48 views

When saving Open Office files they used to stay Open Office files, now they change to Terminal files

It used to be that when I saved Open Office files they would stay Open Office files. Now, they change to Terminal files, as it keeps opening in my dock. How can I remove or stop Terminal opening (I'm ...
3
votes
2answers
5k views

echo color coding stopped working in mountain lion

The following produced text with different color on terminal in Lion, but not in Mountain Lion. Why? What can be done to echo in color on Mountain Lion? echo -e "Some text \e[0;32m in color \e[0m no ...
2
votes
2answers
746 views

Terminal : needs full path to execute a command

Let's suppose i have an application in /Applications/MacPorts/KDE4/myapp.app/Contents/MacOS/myapp. When i use cd to reach the directory 'MacOS' and then issue the command myapp it says command not ...
9
votes
1answer
9k views

How to launch pdf viewer from the terminal

I'm working using LaTeX, since I compile the document in the terminal, it would be much easier for me to open it in pdf viewer directly from the terminal. I'm using OS X 10.8.2 in Polish, so I'm not ...
7
votes
2answers
1k views

How do I find the windowid of Google Chrome to pass to screencapture -l [duplicate]

I'd like to use screencapture -l to do automated screen captures of Google Chrome. This requires knowing the windowid of the Google Chrome process that's running. For apps that support Applescript, ...
1
vote
2answers
893 views

Dictate and speak/read text from Terminal

I have an idea in mind for a Terminal command I run often. I haven't found answers to these on my own, and they all have to do with voice/dictation: Dictation in Terminal Can I dictate to the ...
0
votes
2answers
385 views

nvram -p shows “LocationServicesEnabled %01” … does that mean I have a GPS?

What does LocationServicesEnabled mean on a MacBookPro Retina?
2
votes
2answers
486 views

How to add new keystrokes to the system settings from Terminal

I am currently creating a list of terminal commands to set up a new mac system according to my needs. Now I would like to add new keystrokes to Preview (normally in the system settings => keyboard) ...
3
votes
2answers
533 views

Always open a file in a specific program

I'm having an issue with forcing a file of a certain type to always open with a specific program. In this case, it's .indd (Adobe InDesign) files. I have Adobe CS6 installed, and also Adobe InDesign 5....
6
votes
1answer
334 views

Incorrect Terminal.app output for long lines with tabs

When I run the following command in Terminal.app: echo -e "a\tb\tc\td\te\tf\tg\tyo" I should get the following output (using a 40-column window so that lines don't wrap here, and replacing tabs ...
3
votes
1answer
679 views

Sharing mac clipboard with vim inside terminal

I use vim inside terminal and trying to share the mac clipboard with vim. Compiled vim with xterm_clipboard support and installed XQuartz. MacBook-Air:web-ui nagakirank$ vim --version | grep ...
0
votes
2answers
1k views

Open Outlook new message window from terminal

I would like to open a new message Outlook window from terminal and ideally prefill the message body too. Any ideas on how to accomplish this? Txn!
2
votes
2answers
470 views

“sed” or “awk” launched on opening terminal window

At some point, I've noticed strange behavior of Terminal app - now on opening new window i get this as normal: Last login: Tue Nov 27 11:54:21 on ttys001 but can't see the "~" sign afterwards and ...
15
votes
4answers
141k views

How do I make the hard drive visible in the Finder?

On OS X Lion I don't see the hard drive in the Finder and I seem to have no permission to create a folder under / from terminal. I know I can do this if I activate the root user, but I need to be ...
0
votes
0answers
232 views

terminal ask for ssh passphrase every time

I'm relatively new in the Mac world, and right now I'm having a problem with Terminal. Every time I open Terminal (new tab or new window) I have to insert the SSH pass phrase. Why? How can I ...