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

0
votes
0answers
184 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
27 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
97 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
12 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
410 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
80 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
260 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
44 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
68 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
31 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
16 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
144 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
74 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
236 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
609 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
62 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" to ...
0
votes
3answers
634 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
53 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
215 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
149 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
57 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
38 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
154 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
28 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
67 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
107 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
36 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
472 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
85 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 ...
2
votes
0answers
46 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
72 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
20 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
37 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
44 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
283 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
96 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
49 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
69 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
4answers
800 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
192 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
52 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 ...
0
votes
1answer
1k views

Can't start Octave 3.8.0 in GUI mode

I installed Octave 3.8.0 using homebrew. The Octave official FAQ says I can use --force-gui option to start octave with the GUI. But when I use octave --force-gui command in the terminal, nothing ...
0
votes
4answers
263 views

Reformat / resize an external hard drive removed from a NAS

I have a 3TB hard drive that I removed from a NAS that is only showing as 800MB on my Mac. Have tried Disk Utility (and terminal diskutil) but the hard drive keeps showing at the wrong size. ...
0
votes
3answers
228 views

Applescript - Unable to find resource when inside application

I have a regular Applescript application bundle that executes an applescript file when it's run. I'm trying to run a shell file that is located at "/Contents/Resources/Data/df.sh", however with the ...
1
vote
0answers
33 views

set default browser (all users) from CL?

Is it possible to set the default web browser for the computer (i.e. for all users) from the command line? If I understand correctly, individual users' browser preferences are stored in ...
0
votes
1answer
76 views

How to install the RHIDE C++ IDE in OS X?

I'm looking to mimic the environment of the classic Turbo C++ compiler from the DOS days on Mac OS X. I have used DOSBox with actual Turbo C++ installed in the virtual drive, but I'm just ...
0
votes
1answer
120 views

Move files to individual folders, using file name as folder naming convention for folder, using Terminal

I've been looking for answer on the web now for a few hours and can't find what im looking for. What i want to do is move each file in a directory to a new folder using the name of the file, excluding ...
2
votes
1answer
125 views

Special character codes are displayed in the Terminal for diacritics when connecting to an Ubuntu Server

When I connect to an Ubuntu Server (ssh) and I try to see some text in the Terminal form the remote server, I get character codes instead of the appropriate text with diacritics. for example for a ...
3
votes
1answer
141 views

Using `say` to read terminal output from a command line tool?

I'm not sure if this is possible. I'm using a command line log parser for an MMO I play. Information is shown in Terminal window but I have to read it while playing rather than hear it while playing. ...
1
vote
1answer
72 views

How to install terminal application globally?

So I mess around with terminal once in a while. Occasionally I find I have to compile from source with the usual: ./configure make (sudo) make install I'm trying to install gtk+ following the ...