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

0
votes
2answers
585 views

Run java bundled in .app from command-line

The question is how do I run some application written in java and bundled into .app package from command-line? The main purpose of this is to run an application under JDK7. So I will start it with ...
8
votes
3answers
2k views

TotalTerminal doesn't work with full-screen apps

TotalTerminal (former Visor) is an awesome plugin for Terminal that turns it into a Quake-style console that slides down on a key combination. This is tremendously useful for development because I ...
3
votes
2answers
3k views

Terminal: Path to Network Drive in Applescript

I am trying copy a file up to a network drive in AppleScript. Normally I would do.. do script "mv ~/Desktop/file.txt ~/Folder/file.txt" What is the correct path to a network drive? I normally ...
7
votes
2answers
609 views

Multiuser GNU screen sessions

I am attempting to set up multi user screen sessions on Mac OS 10.7.3 and I run into the error Attach attempt with invalid pid(xxx)!. If set it up as follows: Initial configuration of system: Make ...
8
votes
1answer
2k views

How can I initiate a Google Voice phone call from the command line?

Thanks to Brett Terpstra I can easily send an SMS through Google Voice in Terminal, but now I want to be able to initiate a phone call via Termainal too. There is no Google Voice API (yet?) so I know ...
2
votes
3answers
330 views

How do I delete all files from a directory tree where the filename contains special characters such as öäüß

I have a problem with my backup program which means that I need to delete all files and folders in a specific directory tree where the filename contains special characters, in my case the German ones ...
20
votes
2answers
21k views

How can I find the serial number on a mac programmatically from the terminal?

What command can I use to retrieve the system's serial number from the unix command line? As uname will output some information about the software and hardware, I would like to retrieve the serial ...
3
votes
2answers
591 views

Add shortcut for multiple terminal commands?

I find myself doing this too often - navigate to a folder, "Open Terminal Here", then "mate .", then "python -m SimpleHTTPServer" I was wondering if it's possible to add a button to the finder ...
1
vote
2answers
552 views

Mac OS X Lion Terminal

I have a question about my terminal. When I started out working with Rails on my Mac terminal, I would have lines that looked like this as the route for my $: Nicholass-MacBook-Pro:sample_app ...
8
votes
3answers
19k views

How do I mount ejected external USB flash storage? [duplicate]

Suppose that we connect our flash USB drive to a MacBook, then eject this storage from Finder sidebar. Now I want to remount this storage without unplugging and replugging it into the computer, but ...
5
votes
1answer
2k views

How can I change the modified date of a symlink?

I would like to change the modified date of a symlink. The symlink points to a directory so it cannot be a hardlink. The following command works fine in the terminal for an actual directory, but it ...
3
votes
2answers
2k views

Is there a way to turn on and off the Mouse Keys feature using AppleScript or a terminal command?

I'm running Mac OS X 10.7.2. Is there a way to run an AppleScript or terminal command that quickly turns on or off the "mouse keys" feature under the Universal Access tab? Ideally I'm looking for a ...
11
votes
2answers
5k views

Make ls command sort by file type (e.g. directories and file extension)

How do I make ls sort by file type (e.g. directories first and then by file extension)? The answers suggested in (Super User) Make ls sort by file type result in unknown option errors from ls.
1
vote
3answers
499 views

Why does Terminal ignore capital “B”?

this happens to me from time to time: when I am using the Terminal, suddenly the terminal starting to ignore the capital 'B', regular 'b' works fine, other capital letter work fine. other applications ...
1
vote
1answer
2k views

Why can't you create/open multiple instances of iTunes?

In terminal, the open -n ~/Applications/iTunes doesn't create a new instance of iTunes, just switches to the one already open. Why?
8
votes
4answers
6k views

Remotely SSH to IP address in home network

I've got a device at home I want to SSH to from work. The device has port 22 open locally and I have port 22 opened on my AirPort Extreme. However, on the AirPort Extreme it says the open 22 port only ...
2
votes
0answers
290 views

C and C++ executables freeze in Lion, remotely hosted on Ubuntu box [closed]

I'm trying to compile and run some very simple C and C++ code in Lion. Compilation works fine. Running the executable leads to the 'spinning beach ball of death.' Force-quitting out of Terminal ...
23
votes
5answers
22k views

Can I view system stats in the Terminal?

The widget iStat Pro allows to monitor different system stats like CPU usage network bandwidth in/out memory usage ... How can I view such system stats in the Terminal?
2
votes
4answers
3k views

List the extensions installed in Safari for Mac OS X, and state whether each one is enabled

I'd like a list, from which text can be copied. (Not a screenshot of preferences.) This information does not appear in any of the following: Safari System Profiler in Snow Leopard System ...
12
votes
3answers
3k views

Is there a way to auto-complete the open command in Terminal?

I frequently use the open -a command in Terminal to open applications via ssh. How do I make it auto-complete an application's name?
12
votes
2answers
7k views

What should I do when the menu bar seems frozen/unresponsive?

Several times the menu bar on my Mac has frozen and I've had to restart the whole computer. I know that there must be a better way to fix a frozen menu bar than restarting. How can I kill the menu bar ...
6
votes
3answers
9k views

Script to raise a single window to the front

In a script I'm trying to find the Terminal.app window containing a specific tty device and raise that window to the top. Here's what I have in Applescript so far: tell application "System Events" ...
1
vote
0answers
87 views

why does less seem to think my terminal has more lines than it does?

Don't know if this is really an OS X question, but: less seems to insist that my terminal (whether I'm using the builtin Terminal or iTerm2) has more lines than are actually displayed, and so the top ...
3
votes
3answers
604 views

Terminal shortcut keys

I've recently immigrated from Ubuntu to Mac OSX Snow Leopard. I use the terminal (iterm2) extensively, and I am a great fan of shortcut keys. The standard shortcut keys (which work in any GUI ...
3
votes
2answers
976 views

How to wake the screen from terminal?

I often have my MacBook Pro in clamshell mode attached to the second monitor. On my first monitor I have Windows machine and I use Synergy-Foss software to share only one mouse+keyboard between them. ...
9
votes
1answer
3k views

Change Network location from terminal

I have a two locations set up on my macBook. One for normal use and another for when I use a proxy, which I start from the command line. It would be very useful for me to be able to switch network ...
2
votes
1answer
129 views

'script' command in terminal, looking for a flush open

When I use 'script' on a unix terminal the -f option flushes the data straight to the file - from the man page "-f Flush output after each write. This is nice for telecooperation: One person does ...
1
vote
3answers
2k views

How can I create a folder named like the current date in bash

So I'm messing around in my .bashrc making different aliases and playing with my prompt. I'm trying now to make an alias that will move into a specific directory, make a new directory based on the ...
1
vote
2answers
251 views

How can I get Unix (brew/xcode/vim) acting like Unix under Lion?

I "upgraded" from Snow Leopard with Homebrew and vim both chugging along happily, to Lion. Now vim hangs/segfaults, and when I invoke brew, it complains xcode is missing, and continues to do so after ...
2
votes
1answer
272 views

Long command in terminal.app cause a bug

If I am in the last line of Terminal.app and enter a long command, it does not create new line, but instead overwrites the same line. How can I solve this bug?
1
vote
1answer
647 views

Bash problem Mac OS Terminal

Hi when I pressed the up arrow to see the previous command, it rewrote the current command from half. Example: 21 /usr/local/sphinx/etc > /usr/local/sphinx/bin/search --config ...
4
votes
1answer
841 views

How do I enable SSH server on startup through Terminal?

Curious as to how I can enable the sshd to start on startup solely using terminal. The GUI is great and everything but it doesn't go well with my bash scripts.
4
votes
5answers
2k views

Show text using Large Type without relying on third-party applications

Apple has this amazing feature called 'Large Type', chiefly implemented into Address Book. When you look up a contact, you can right-click the phone number and click 'Large Type', and it will display ...
2
votes
5answers
7k views

In Terminal, can I find out the current Finder folder?

It is commonly asked how to get a Terminal prompt from a Finder window. I am asking the opposite. I would like a command-line way of determining the working directory of the "current" Finder window. ...
32
votes
3answers
27k views

Are there any keyboard shortcuts to switch between tabs in terminal?

Are there any keyboard shortcuts to switch between tabs in terminal?
3
votes
2answers
1k views

SSH Key Error, sudo works fine

When I try to ssh (using ssh user@server.com) into my server at home from either the local network or from outside, I get the following error: But if I use sudo ssh user@server.com, it works with no ...
3
votes
1answer
185 views

Order of parameters for command-line tools [duplicate]

Possible Duplicate: Can command-line commands be made insensitive to order of filenames and options? It looks like the OS X built-in command line tools, such as ls, du etc are rather strict ...
0
votes
3answers
271 views

grep syntax issue on Lion

I have a text file and looking for the single line bird. Using OS X Lion and grep 2.5.1. this works: grep '^bird' file.txt but this doesn't grep '^bird$' file.txt There is not a blank space ...
1
vote
1answer
3k views

Setting a static route every boot with launchd / plist is failing

I hope to use launchd to set a static route on a server at boot time since I haven't figured a better way to configure this sort of networking on a server. My problem is that the command seems to be ...
1
vote
1answer
1k views

How can I press escape on a Bluetooth keyboard with my iPhone?

I sometimes use a BlueTooth keyboard with my iPhone, which is lovely for writing emails, but I run into difficulties when using terminal on the iPhone - I like to edit files with vi(m), which requires ...
6
votes
2answers
1k views

Strange behavior in Terminal with custom .bash_profile

It's hard to describe the behavior, but here's a short clip: http://www.youtube.com/watch?v=9KqHBA94FPI Basically, when entering multi-line commands, at the end of the first line, the insertion ...
1
vote
2answers
1k views

What is your preferred way to start a (shell) script from the GUI?

I was wondering what ways there are to start a (shell) script from the GUI, e.g. double-clicking an icon in Finder or launching via Spotlight. This is not about opening a terminal and "manually" ...
39
votes
3answers
26k views

How can I prevent an SSH session from hanging in OS X Terminal?

When I close my MacBook with an active SSH session in Terminal and then wake it up, the prompt goes unresponsive. In about five minutes it says Write failed: Broken pipe and terminates. This ...
3
votes
2answers
347 views

Where do these Terminal commands come from?

I don't know any specific term for these Terminal commands, so i want to give an example: defaults write com.apple.dock itunes-notifications -bool TRUE With this command, you can enable an ...
5
votes
1answer
4k views

List of (activated) fonts with shell command in os x

Is here any shell command for getting the list of activated fonts? Mean something like: some_font_util -activated -format 'file: name' for getting a list of activated fonts in a form: ...
0
votes
3answers
5k views

ssh/terminal tricks with iPhone [closed]

I have a lovely jailbroken iPhone 4. Works fine. Very much enjoying being able to ssh into the device, but I can't help feeling I'm missing a few tricks with the ssh, would anyone be able to point me ...
29
votes
10answers
17k views

How can I sleep the display from Terminal?

I'd like to be able to turn my screen off from command line. I know there's the keyboard shortcut ctrl+⇧+⏏ but I want to do it from a shell script or remotely. Is there a way?
2
votes
1answer
4k views

Turn on bluetooth via terminal/command line

How can I turn on bluetooth via the terminal / the command line?
14
votes
5answers
7k views

iTerm2/Terminal full screen

Why is it not possible to have iTerm2 or Terminal app take up the full available space on the screen. Let me show an example: It's hard to see but if you look on the right and bottom edge, there is ...
3
votes
3answers
785 views

Enable full-screen mode for applications on Lion

There some applications which I can not yet run in full-screen mode. I particularly would need the OSX Terminal app and possible the TextEdit. However, after the upgrade they remained the same, and ...