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

1
vote
1answer
18 views

Equivalent of Ubuntu’s write-mime-multipart?

I would like to generate a multipart mime-encoded document for use as user data on EC2 instances. On Ubuntu, one is supposed to use write-mime-multipart to do this, as per these instructions. Does ...
2
votes
2answers
30 views

set custom file extension to open with specified program

I want to have all files with an extension of .fw.png to open in Fireworks (not necessarily .png files though). Is there a way to do this in Terminal?
2
votes
2answers
203 views

Legendary sudo rm -rf /

Just curious, what happens in OS X Maverick if someone issues sudo rm -rf /? I heard most modern *nix systems are protected from this epic fail.
0
votes
2answers
118 views

Is there an equivalent utility to Linux's tracepath for OS X?

I'm attempting to determine the path MTU from my Mac to various sites, and can't find a built-in utility to accomplish this. In Linux, I would use a utility like tracepath, but I"m wondering if there ...
3
votes
1answer
45 views

Terminal not displaying colors for directory listings

I don't know why my bash session doesn't show colors. I have tried Terminal as well as iTerm. I have tried: ls -G Setting export CLICOLOR=1 and export LSCOLORS=GxFxCxDxBxegedabagaced Using ...
1
vote
2answers
540 views

What is the Mac equivalent of Windows “start” command?

I'm creating a script that runs several other scripts. I need them to all start up in their own process (read window) so I can review the output of each, but I also need them to run in parallel, so ...
2
votes
0answers
103 views

Uninstalling Genieo broke my system

Update below, the rest is more or less background information. After discovering a Genieo install, I vaguely recalled it being, well, not trustworthy. After a quick search I knew I wanted to ...
1
vote
1answer
11 views

Reset custom Mail UserHeaders settings in Terminal

How do I reset the following command? defaults write com.apple.mail UserHeaders '{"Reply-To" = "reply-to@address"; }' I had to use this workaround for a problem with the hosting provider that used ...
2
votes
1answer
37 views

Modifying .plist with shell changes .plist order

I wrote a simple shell command and saved it as .command. The shell command is simply: defaults write /Users/Milo/Desktop/MyPlist "My Key" "My Entry". The issue that I'm having is that after running ...
0
votes
0answers
165 views

hdiutil returns error when creating Ubuntu USB stick

I am following an online tutorial for creating an Ubuntu USB stick on OSX but I'm stuck in step 3: Convert the .iso file to .img using the convert option of hdiutil (e.g. hdiutil convert -format ...
0
votes
1answer
21 views

What files do I edit to be able to maximize Finder windows to fill the screen by shift-clicking the green button?

Is there a group of files or a single file I can edit to facilitate maximizing "Finder" windows to fill the entire screen just as other application windows by shift-clicking the green plus button?
1
vote
1answer
53 views

File tree list Mac Terminal

I am trying to create a .txt file that is the output of a certain function in the terminal. So my function is to create a list of all the files that i have inside the folder TEST so what i typed was: ...
0
votes
1answer
10 views

Converting filenames with embedded backslashes to directory tree

I recently extracted a ZIP file that I expected to contain a path hierarchy but turned out to be a flat archive of files with backslashes in the filenames. So I ended up with something like: $ ls -1d ...
1
vote
1answer
124 views

Mavericks - VPN command line

I see a lot of third party apps that offer the ability to turn your Mac into a VPN server. It seems the VPN server functionality is built into OS X from what I've read but you need OS X server to get ...
3
votes
1answer
47 views

How to use an application name to kill it from a script

I'm trying to create a cron job to prevent children at a school from running the Minecraft server. (We actually need them to run the Minecraft client because we use it to teach programming.) The name ...
1
vote
1answer
60 views

command not found for shell script

I created the following bash script in OS X 10.7.5: $ cd ~/Documents/github/scripts $ vim hello_world.sh #!/bin/bash clear echo "The script starts now." echo "Hi, $USER!" echo "I will now fetch ...
2
votes
1answer
32 views

String of variable has a space - how do I escape spaces?

I'm working on an applescript that pulls old Time Machine backups and places them into a new folder. But if the old computer name has a space in it, that causes an issue in the do shell script ...
1
vote
1answer
37 views

How to enter password automatically in .command

So my .command file looks like this ssh someuser@someip.com When I run just this it prompts me for the password, how do I make terminal enter the password instead of me having to type it in? I ...
0
votes
1answer
20 views

Run Emacs within Bash

I am looking for a way in Bash to run something within Emacs. For example, if you run emacs, press esc+X then type "life," you get a little simulation of Conway's Game of Life. How could this be done ...
0
votes
0answers
14 views

Top command not outputting all information

I'm trying to put together a script which collects the information produced by the top command relating to the system rather than the processes (i.e. the top few lines). When viewing in top binary ...
1
vote
2answers
70 views

how to set mac desktop background as working terminal

I would like to set my background to a working Terminal window even when I minimize all applications. I would like to be able to write commands on desktop but I don't know if it is even possible. I ...
1
vote
1answer
48 views

odd behavior of pgrep in bash script

I have a script to kill a process tree that works fine in linux but I am experiencing some odd behaviour on osx. It actually works fine with my unit tests and also when trying to run it manually on ...
0
votes
2answers
118 views

Why Does a Shell Script Trapping SIGTERM Work When Run Manually, But Not When Run via launchd?

Okay, quite simply I have a shell script that needs to wait for something to happen, but it has a lock-file and some child-processes that I need to ensure are tidied up if the script is interrupted. ...
4
votes
4answers
336 views

How to edit the /etc/hosts file?

When I open the file with TextEdit (I don't want (truly, I am not able) to use vim), it is seen as "locked", even if I modify the permissions of the file via the "Get Info" window. How can I modify ...
0
votes
1answer
34 views

Scaled Resolution switching interfering with Terminal startup.

I saved a window group in Terminal and set that as my default startup group in Terminal preferences "On startup open: window group..." If I then switch my resolution scaling from "More Space" (a.k.a. ...
0
votes
2answers
142 views

How to use “open in terminal”, “always on the top” and “two windows side by side” on mac?

The first. I'm a Linux user. I just bought my new Macbook. and yeah, trackpad on a Macbook and another UX features quite useful and quick but i still need some features from Linux that i think it also ...
0
votes
1answer
36 views

OS X - How to have starting applications (optionally) not take the focus?

Is there any way to have starting application not take the focus? Is there a setting so new windows do not pop over what we are currently working on? (Perhaps an option to have them pop under, or ...
3
votes
4answers
95 views

AppleScript: Press Enter Every X minutes If Terminal is Open and Application Has Been Idle for X Minutes

I am new to AppleScript and am attempting to use it. If I am using Terminal and if I have not pressed a key for x minutes I want my Mac to press the return key. It is to repeat this process every y ...
1
vote
1answer
59 views

ssh-add every time I want to use SSH to login to my remote server

I have SSH keys installed on OSX Mavericks installed at ~/.ssh/ Everytime I want to SSH to a server from Terminal, I need to do the following: eval `ssh-agent -s` ssh-add ~/.ssh/example_rsa If I ...
0
votes
0answers
30 views

Switching Network Locations under Mavericks

When using Lion I could issue this command at the terminal to change network locations(which I got from this site, thank you): networksetup -switchtolocation "Proxy" I've recently upgraded to ...
2
votes
2answers
19 views

History commands render incorrect on Bash Vi mode

I'm having this werid and really annoying issue in bash vi-mode. Env: Mac 10.9.2, iTerm 2 1.0 or Terminal.app, $TERM={screen-256color|xterm-256color|xterm|vt} Repro steps: Run some long commands ...
3
votes
2answers
78 views

Add Static ARP Entry at Boot

I'm new to Mac OS X. On Linux I'd: append to /etc/rc.local arp -i eth0 -s 192.168.1.1 00:00:00:00:00:00 I've figured out how to do it in Terminal: sudo arp -s 192.168.1.1 00:00:00:00:00:00 But ...
1
vote
2answers
25 views

How to find physical location of an application by name?

I can open Terminal and execute open -a "iPhone Simulator" and as long as the application is installed, it will launch. Is there a similar command that will return the path to the application instead ...
0
votes
0answers
38 views

Terminal freezes because of corrupt file

I wanted to edit the httpd.conf from apache2. I wanted to uncomment the php5 load line so it gets included. I started the terminal and used sudo nano /etc/apache2/httpd.conf to edit the file and ...
0
votes
0answers
63 views

Binding Escape Sequences to Terminal Keys Produces Characters, Not Actions

I was using an iMac from 2009. I had upgraded it regularly, going up to (and including) Mavericks. When I first got that iMac, I fixed the keys in Terminal so Home and End would move the cursor to ...
0
votes
0answers
31 views

/Volumes directory gone missing. Scared to reboot. Mystified

Somehow my /Volumes directory has gone missing. Fooling around with fuse, trying to mount my iPad's filesystem, I typed sudo ifuse /Volumes/ and lo, my /Volumes directory is gone. cd /Volumes returns ...
1
vote
1answer
138 views

Opening new Terminal.app window/tab with a certain profile from command-line or AppleScript?

When I login to my Mac, I want to automatically open a new Terminal.app window with a certain profile, say Monitor, that has a startup command and several appearance settings. I thought it would be ...
1
vote
1answer
50 views

Why does my path not get saved even after editing ~/.bashrc? [duplicate]

I've added maven to my path, but it doesn't seem to be persisting to the path beyond the lifetime of the terminal application. I've modified my ~/.bashrc, but it still isn't storing the modified ...
1
vote
0answers
26 views

How to switch from Spotlight to Alfred via Terminal?

I installed Alfred through homebrew-cask. I want to disable Spotlight and let Alfred be opened with Cmd+S. The first Terminal-based solution I tried was unloading Spotlight with sudo launchctl unload ...
1
vote
1answer
49 views

How to open shell scripts in editor when double clicking on them

I'm trying to migrate to OS X. One thing what I find really strange / dangerous that by double clicking on shell scripts, I launch them in Terminal. I would like to change this behaviour to open them ...
0
votes
0answers
14 views

Convert absolute symlinks to relative ones?

I've seen plenty of threads on the Internet about doing the opposite, but what I want to do is, given a folder: /Lib/Foo/Bar.framework/Versions/1.5 And a symlink to it: ...
1
vote
1answer
30 views

How do I tell AppleScript to read the contents of the “Network” Finder window?

I'd like to be able to get the contents of Finder's "Network" folder (Menubar-->Go-->Network). The folder contents here is different than /Network or /net. The overall goal is to grep the names in ...
1
vote
0answers
34 views

Detecting that an external display is plugged in or unplugged on a laptop via bash

Is there a way via bash to detect that an external display has been plugged in or unplugged via bash? I know that I can create a crontab command that fires a script that uses the system_profiler ...
0
votes
1answer
124 views

Automator: Change to selected directory and run shell script

I'm trying to create a context menu command via Automator service. The context menu command will run a shell script to create some default documents in the given directory. I wrote out the shell ...
1
vote
1answer
63 views

Vim like terminal

I recently discovered terminal's feature, you can set the keys emacs or vi style I prefer the second. so if you do set -o vi You can use k j l h keys to navigate on the command line. And you can ...
2
votes
1answer
29 views

Safest way to copy files to AirPort Disk from the command-line?

I have just started using an AirPort disk (a Drobo connected by USB to the AirPort Extreme). I am trying to decide what is the ‘safest’ way to copy files to the Drobo from my MacBook Pro, which ...
0
votes
1answer
59 views

What is the best way to migrate a .bash_profile to Mavericks

I have a pretty extensive .bash_profile set up on my older machine using Lion and I would like to include a lot of the same functionality. I noticed that Mavericks doesn't have a .bash_profile by ...
1
vote
3answers
199 views

How do I remove crashplan from my Mac

I recently tried out CrashPlan on my Macbook, but I decided not to go through with that. However, now that I'm not going to be using CrashPlan after all, I can't figure out how to remove their app ...
2
votes
2answers
188 views

cd to directory with name of `-`

I'm trying to make a folder called -. I know it's a silly name, it's named so to mirror something else. mkdir - ls > - cd - This makes it go up a folder or exit the symlink context depending on ...
2
votes
1answer
41 views

Is there a tool to save a snapshot terminal session for later recovery, like a virtual machine?

I work on multiple projects with multiple type of servers required, and when I switch project I shut down any of the applications and start the ones I need at that moment from the terminal. I ...