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

14
votes
3answers
14k 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
113 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 ...
6
votes
2answers
4k 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
551 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
166 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 ...
18
votes
2answers
87k 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
1k 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
172 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
90 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: ...
12
votes
3answers
5k 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
423 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
54 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
390 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
73 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
570 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
662 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
31 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
127 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
150 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
53 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
3k 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 ...
2
votes
1answer
689 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
450 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
231 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
7k 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 ...
2
votes
1answer
498 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
251 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
957 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
516 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
741 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
54 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
50 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
376 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 ...
14
votes
2answers
9k views

Why do I need to put sh before running .sh files?

When I want to run .sh files in Terminal, I need to put sh in front of them. Is there any way to avoid this, and thus save typing?
0
votes
1answer
211 views

screencapture -l not working: illegal option

I've wrongly opened the same question on StackOverflow. I hope to find a better explaination here. I've seen in many pages (for example here: How do I find the windowid to pass to screencapture -l?) ...
2
votes
1answer
286 views

How can I send the current working directory from bash to Terminal?

I set up a very nice custom bash prompt in .bash_profile, but I noticed that I've now lost the ability for new tabs to open in the same directory, and the ability to see the current working ...
1
vote
1answer
115 views

Automate opening multiple tabs when starting Terminal

I am trying to automate opening of multiple tabs, naming each tab (printf "\e]1;${TAB_NAME}\a") and doing a cd and maybe something else in each tab. Can that be done either in a startup script or, ...
0
votes
2answers
46 views

wacked a directory from the command line

I was copying a file to /usr/local/bin from the commandline on a Snow Leopard Server 10.6 ... anyhow i typed the following ... sudo cp ./le /usr/local/bin Ouch ... that missed last forward slash ...
2
votes
2answers
3k views

What Version of Bash comes with OSX 10.9 / Mavericks?

Trying to decide if I want to bother upgrading my bash shell to v4.x; if it comes with Mavericks, I probably won't, but I can't find much information on what versions of bash come with what versions ...
1
vote
2answers
663 views

Rename terminal tab to host alias in ssh config

I am new to using Mac (Mac Pro, OS X 10.8.4) and I connect to many remote hosts using ssh. I have created aliases in .ssh/config file and would like to have the host alias as the name of the tab in ...
3
votes
2answers
128 views

Shutdown without and close all windows from terminal

If I shutdown/reboot from Menu I get an option of saving state of open windows or not, but if I issue a command from terminal say shutdown -h now it will shutdown remembering all open windows, how can ...
1
vote
1answer
85 views

Are there any Terminal commands that would be interesting for a young child?

I am beginning to teach my 4-year-old daughter that she can do more on a computer than watch cartoons on Netflix. I want her to know that she can type things on the keyboard and make the computer do ...
2
votes
3answers
7k views

How do I run sudo command from standard account?

From what I've read, it is good security approach to have two accounts, one admin and one standard. I am trying to run the following command in terminal on my standard account sudo mv ...
0
votes
0answers
133 views

What is the limiting factor in /dev/zero speed?

I have installed 4 brand-new SATA hard drives in a mac pro. My OS is running on a fifth drive (SSD). I run this command pv /dev/zero -tpreb | sudo dd of=/dev/rdisk1 bs=512k for many hours to ...
9
votes
1answer
373 views

Is it possible to set the output language of shell commands to anything other than English?

Am I correct in my assumption that shell commands such as cp, man, ls, etc. always print their messages in English regardless of system and user settings, and also standard shell messages like ...
0
votes
0answers
120 views

How to send photos from Mac to Photo Stream manually

No iPhoto, no Aperture, just want to send/upload a photo using my Apple ID and browser/finder/terminal (on Mac) to Photo Stream on iCloud. Thanks.
0
votes
0answers
285 views

how to activate yadr after installing `ho my zsh`?

I have installed yadr and then ho my zsh how do i revert and activate yadr ? I have googled and found only how to uninstall ho my zsh: ...