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

4
votes
3answers
28k views

Can't change folder permissions

I'm running Mountain Lion and I have a folder in ~/sites that has a red icon on the folder and I can't open it because 'access is denied'. What I've tried: Get Info > unlock with admin password, ...
1
vote
1answer
943 views

Terminal commands for “Application Windows” and “Show Desktop” in Mountain Lion

The title pretty much says it all. I need to know the terminal commands for "Application Windows" and "Show Desktop" in Mountain Lion so I can make aliases on the dock with Automator. I don't like hot ...
5
votes
2answers
8k views

How do I re-enable the Press and Hold character picker on OS X Lion?

I disabled the character picker by reading this other question, but I want to remove that change and restore the picker. When I type -g ApplePressAndHoldEnabled -bool true into Terminal, it does not ...
1
vote
1answer
327 views

no key repeat in Xquartz (x11)

I don't think I've used x11 since switching to Mountain Lion (and thus Xquartz). I recently tried to use it and my key repeat isn't working. When I press a key, it inserts the corresponding ...
1
vote
1answer
59 views

“open -t” vs. “open -ef”

the Command: syslog | tail | open -ef works perfectly on my osx 10.8.5 and opens the required lines from syslog in textEdit, however when I run syslog | tail | open -t which should open the same ...
2
votes
3answers
7k views

How To Securely Erase Free Space Using Terminal?

A friend told me that when you delete a file on your Mac in the normal way it actually stays where it is, but it is just no longer usable by your Mac. The addition of more files to your Mac causes ...
1
vote
1answer
260 views

Can I map a character to a different key?

I am using a British IBM model M keyboard with Mountain Lion. I have selected the "British - PC" input source and it is working well, except for one key: the pipe. If you consider what is printed on ...
7
votes
2answers
700 views

How can I process/read checkmarks on a paper form?

I would like to process a large number of scanned paper forms (GUI or command line). I am only interested in reading (custom) checkboxes. The form looks like this: every line has 6 circle-shaped ...
0
votes
1answer
128 views

Error Opening Image File in Terminal

Much like: How do I cat a deleted file which is still open by its inode?. I am using 'Sleuth Kit' command line tool, to gather relevant data from the disk. But I keep on getting: Error opening image ...
2
votes
1answer
367 views

Search files across folders and move recursively to new folder

I need a way to search from a base folder, all the folders inside of that one recursively, and find all photos of JPG and PNG that were created before a certain date (01.Feb.2013) and then move them ...
6
votes
3answers
704 views

Terminal command to bring up shutdown dialog?

I know how to shutdown a Mac from Terminal, but is there a way to actually bring up the shutdown dialog you get from Apple → Shut Down…?
3
votes
5answers
10k views

How can I create custom right click context menu items in Mountain Lion? (“New File”, “Open Terminal Here”, etc.)?

I've been a native windows'er up until this year and have finally made the jump to OSX. I've found my workflow (web developer) has increased substantially and I love the general performance and ...
3
votes
1answer
2k views

How to fix multiple errors when installing Homebrew on OSX Lion (mainly OSXFUSE and Mono related)

I'm trying to install Homebrew but I'm getting multiple errors when brew doctor is run. I'm a complete noob at this and I've tried uninstalling Homebrew and re-installing, but still not working. ...
8
votes
3answers
6k views

Disable Spotlight Index on 10.8 on Specific Volumes

To switch off indexing in Terminal I use: sudo mdutil -a -i off This disables it with the -a switch across all volumes and the -i off part turns "off" the indexing. If connected to my iMac is the ...
29
votes
2answers
29k views

Run AppleScript from bash script

If I wanted to run an AppleScript from within a bash script I could call a file with the list of commands that I require to execute. #!/bin/bash {some commands} osascript file.scpt {other commands} ...
3
votes
1answer
139 views

Exporting the filepath of all music files to a text file

I'd love to know the syntax within Terminal to export the filename and path of all my music of various types (I have legacy Windows .wma files too). I'd presumably export those file to a .txt or .xls ...
8
votes
2answers
11k views

What does -HUP do when used with killall?

Sometimes when I'm running a killall command from Terminal, a co-worker would suggest or edit my scripts to show killall -HUP. What does the -HUP part do?
4
votes
2answers
885 views

Pipe output of grep to a variable

I need to be able to write whether the test for a grep is either TRUE or FALSE to a variable so I can use it later For the following, if I run defaults read com.apple.Finder | grep "...
1
vote
1answer
200 views

Using The Terminal Command and Emacs To Play The Video Game “Tetris”?

OS X via the Terminal command and Emacs apparently allows you to access and play a version of the video game Tetris. How do you accomplish this (and can you play via keyboard controls) ?
4
votes
2answers
3k views

Changing The Dock's Appearance From 3D to 2D?

Sometimes the glossy finish to the Dock 3D's appearance annoys me, and I want something less bedazzling on the eyes. Is there a simple terminal command I can use to convert it from a 3D glossy to a ...
43
votes
3answers
201k views

Using The Terminal Command to Shutdown, Restart and Sleep My Mac?

I'm getting more interested in using Terminal as an alternative way to address solutions on my Mac. I have seen this question entitled "Is there a better way to shutdown/restart OSX?". I would ...
4
votes
2answers
2k views

Bash Script that will start up second Terminal process?

I need a script that will be able to fire up a second Terminal instance and pass a command directly to that one whilst it continues it's own executions. It's to start up Python script that will host ...
0
votes
1answer
215 views

Finder hiding specific file by name

At some time my MBA 10.8 Finder decided (or was it me) to hide certain files from me. Here is the example (I have few other files like it) .. The Water Horse.flv Originally those files are ...
0
votes
0answers
91 views

Bash Commands and Terminal problems [duplicate]

Hello I open my terminal window on Mac Os 10.6.8 as I am trying to update my ruby to 1.9.3 and the terminal gives me this response immediately as I open it: -bash: export: `/Library/Frameworks/Python....
12
votes
3answers
11k views

Show package contents from command line

When working at the terminal, I often use the open . command to open a finder window showing the current working directory. But if the current directory is actually a package, like a .app application ...
2
votes
1answer
612 views

Homebrew: Easy way to add 'gnubin' to path for multiple packages?

I would like to use Homebrew to install GNU versions of several utilities, and use the GNU versions by default with their usual names. From the output of brew install gnu-tar and by reading How to ...
3
votes
2answers
58 views

Man md5 displays dgst man page

I just wanted to look at the man page for the command md5. So I typed man md5 but it displayed the man page of dgst instead of this one. Any idea why and how I could access this manpage from the ...
1
vote
1answer
821 views

More colors than ls -G in file extensions

In the output of ls -G, I can see some extensions get colors like symbolic links or .sh files. What if I also want .jpg, .xml, .wav or .log to have different colors too? Also, is there any way I can ...
0
votes
1answer
93 views

How can I make a .command file that I can share without giving permissions on each computer?

I have a terminal command that I would like to run. telnet 169.254.216.127 54326 Ideally I would like to convert this into a .command file and be able to share it with many other mac users ...
0
votes
1answer
947 views

Check Camera Path through command line

is that a command to type in terminal that lists all the webcams connected to my computer? Maybe using ffmpeg package?
2
votes
2answers
1k views

How to recover from “chown -R $USER /usr/”?

I ran a 'chown' on everything under /usr to a non root user. Meant to run it for /usr/local/ Now I get the error below on opening terminal login(89809,0x7fff7bac5960) malloc: *** error for object ...
0
votes
0answers
32 views

to run latest emacs in terminal by typing “emacs” [duplicate]

Question: Because I use emacs-live, I used homebrew to install emacs-24.3. Now everytime I want to launch emacs of version 24.3 in terminal, I have to type "emacs-24.3" --- if I just type "emacs", it ...
3
votes
2answers
159 views

OSX equivalent for reset

On linux machines I used to type reset on terminal. It was like, closing and reopening the terminal! It is very convenient, because in debugging you wont mix error messages from previous executions. ...
1
vote
0answers
13 views

Access the GPS from Terminal [duplicate]

Is it possible to find out the location of a computer similar to the "set time by location" feature via command line? I'm working on a little script that would update my network location settings ...
1
vote
2answers
270 views

Print All Files in Folder and SubFolders

I had 5 folders each with a couple of files (2-3). I wanted to print all of them in one shot. I found ways to do it in Linux but I couldn't get them to work here. The two alternatives I found for ...
6
votes
1answer
2k views

VIM in Terminal using Solarized Theme

I am trying to use the Solarized color scheme with VIM in Terminal on Mac OS X 10.8.5 Mountain Lion. However, the colors look washed out. They are lighter/paler than they should be. In MacVIM, the ...
1
vote
1answer
56 views

Revert default finder

I used this command to try out an alternative finder. defaults write com.apple.loginwindow Finder /Full/Path/To/Path\ Finder.app I prefer the standard finder - but do not know how to get it back. ...
3
votes
1answer
4k views

How to Sync MacOS Applications + Preferences across multiple Macs without OS X Server?

Will the following work? If not, can someone propose better alternaives to solve this problem? Summary problem: I want to sync multiple MacBook Air's, Pro's and possibly Mini's with the same user-...
2
votes
1answer
1k views

Launch Dictation With Applescript

I would have thought this would be easy to find, but thus far it has not been for me. Is there a way to launch dictation (fn, fn) with applescript or from the terminal?
4
votes
1answer
704 views

Printer Deploy with and custom preset profiles to Mac OS X workstations

How would I go about deploying a network printer (Sharp MX-2600N) to Mac OS X machines that would include a custom printer preset profile (Embedded Printer User Authentication Code)? Ideal Method of ...
0
votes
2answers
354 views

how can I write on my screen using terminal?

How can I write on my computer screen or open an application like notes and write on it from Terminal?? I can open up notes or any other app/document.
0
votes
2answers
10k views

line 1: syntax error near unexpected token `newline' with HTML + shell script

I've been learning the shell with a great tutorial, linuxcommand.org. After a lot of learning and practice with navigating directories, editing files, etc, I've moved on to writing shell scripts. One ...
3
votes
1answer
901 views

How can I run a command that requires user input through oh-my-zsh alias?

I'm trying to add Reminder.app items through the command line by invoking an alias. I use the Automator workflow solution from this question: How can I add reminders via the command line?, which ...
4
votes
1answer
326 views

Terminal CMD + SHIFT + Left/Right Brace No Longer Works

I'm using Terminal and don't know if this has been an issue after upgrading to Mountain Lion, or whether I made a configuration change that had a side effect that I didn't realize. When I use the CMD +...
3
votes
1answer
2k views

OS X Terminal: “backward delete word” works only with C-M-h

Followup on Mac OS X Terminal: Map option+delete to “backward delete word”. The Use option key as meta key option is checked, but the deleting word backwards works only with ^-⌥-H (i.e. one has to ...
1
vote
1answer
787 views

RTF files created using the 'touch' command will not open

I'm no expert on CLI or using the terminal or anything, but I like playing around with my computer. When I create a .txt .html or .md file or whatever using the 'touch' command in terminal, they work ...
0
votes
1answer
1k views

Odd problems with vim over ssh to remote linux machine

I'm having some strange issues working with vim editing files in an ssh session on a remote linux (Ubuntu 13.04 ) server. On the client side, I'm on a mac running OS 10.8.4 (late 2012 mac mini). I've ...
1
vote
0answers
58 views

Is there another way apart from screencapture to take a screenshot of a background window?

I'd like to take a screenshot of a background window given its title. I know this can be made with screencapture -l idwindow output but unluckily I can't use this method because I'm on a 10.5.8 ...
1
vote
0answers
55 views

iTerm2 and CLI menus

How do I get iTerm2 to show CLI menus properly? I usually use those menus over ssh.
1
vote
2answers
623 views

How can I terminate the running sudo command that always reopens?

When i open a new window in terminal i get this: ! I was trying to install MacPorts approximately a year ago and that did not go well. Since i don't use terminal very often I just left it that way....