The terminal emulator included in Mac OS X.

learn more… | top users | synonyms

48
votes
6answers
20k views

Set the title of the terminal window to the current directory

How can I get the Terminal.app in OS X to display the current directory in its window or tab title? I'm using the bash shell.
9
votes
4answers
3k views

Any way to prevent Dropbox from opening the Camera Uploads folder when an iPhone is connected?

When I connect my iPhone to my MacBook Pro, Dropbox always launches its Camera Uploads folder in Finder. Is there any way to turn this off (some command I can run in Terminal, perhaps)? EDIT: To be ...
0
votes
0answers
12 views

Doubled terminal emulation sessions renders foreground and background of characters the same color from the destination

I have some no graphics card (“headless”) server that I have to operate via the serial port as the console to install Linux, VMware, and other OSes. For a terminal server I use a Linux box with a USB ...
0
votes
1answer
28 views

How to close open (20+) notification windows from terminal or disable HP Alerts?

For some strange reason an app called “HP Alerts” filled my screen overnight with notification windows telling me one of my inkjet cartridges are low on ink. I have now disabled these notifications ...
45
votes
6answers
24k views

Mac OS X Terminal: mouse support?

Is there a native option (ie. without installing extra soft/package/plugins) to enable mouse support in the Terminal app? Actually, I'm using a lot vim with the option set mouse=a (activating mouse ...
0
votes
1answer
11 views

Mac Terminal Foreign Host-Name

When I was recently connected to a coffee shop wireless network using Terminal for some coding I saw a foreign "preface" (if that is the right word) before my username. Rather than Normal_Name:~ ...
6
votes
2answers
8k views

How to reset mac PRAM through the command line in Lion/Mountain Lion?

I'm trying to write a script to automate a PRAM reset and I've seen a lot of old guides that tell me to use the following command to reset the Mac's PRAM via the terminal: nvram boot-args="-p -r" ...
17
votes
5answers
4k views

Copy colored output from Mac OS X terminal

I see a nicely colored output in my terminal. The terminal has a "Export Text As" command but it saves a plain-text file without the colors. Same with copy&paste. Do you know a way to save ...
34
votes
1answer
30k views

How to use Terminal to delete all .svn folders recursively?

what command can I type into Terminal so that I can: delete all .svn folders within a folder (and from all subdirectories) but not delete anything else ?
3
votes
2answers
945 views

Where to learn more about OSX terminal app keyboard settings codes?

If you look at the Terminal->Preferences->Settings->Keyboard pane it displays how some keyboard keys and combinations map to shell strings. The list seems really strange to me as it's missing a lot ...
0
votes
1answer
16 views

print names of files in folder from path in terminal

I was making a program and want to see all the items in a folder by giving it the path. my program uses the terminal so the commands are the same. something along the lines of echo ...
0
votes
1answer
21 views

OS X terminal eating the shift key

I'm switching from iTerm 2 to the stock OS X 10.8.5 terminal (work policy, iTerm isn't on the approved software list). In my tmux configuration, I've mapped shift-left and shift-right to change ...
0
votes
1answer
51 views

OS X command to make current terminal window full screen

I am trying to make a bash script to open up my working environment. I want 1) Open up Terminal.app and type a command like "time_to_work" 2) This command will: a. open up sublime text open ...
16
votes
3answers
21k views

Setting iTerm2 as the default terminal (OSX Lion)

I would like to set iTerm2 instead of terminal.app as my default terminal. Go2Shell for example let you open a terminal to the current directory in Finder. I want to ba able to use iterm2 instad of ...
9
votes
2answers
6k views

How can I export all my Terminal.app settings from one Mac to another?

I want to set a group of terminal windows, each one with personalized colours, etc. How can I move the whole Terminal.app setting from one computer to another? Where are they stored? Can't see them ...
2
votes
1answer
2k views

Using Mac OS X terminal to copy a selection of folders to a new location, with merge behavior

I have a folder 'foo' that contains a lot of sub folders, e.g. foo |---20101 |---20102 |---20103 |---20111 |---20112 |---20113 There are way more than this, but hopefully it explains the ...
7
votes
4answers
18k views

How do I make Vim beautiful (read: Textmate font/color ) on Mac OS X Lion? [closed]

I am just starting to make the Textmate to Vim switch. I love it, but it's so ugly. I'm running Mac OS X Lion and needed Ruby support so I am using Vim 7.3 as installed via Homebrew not the Vim Lion ...
0
votes
2answers
51 views

Does closure of Terminal stop remote script execution?

I have NAS (running Linux) and Macbook. What if I start the OSX Terminal application, connect to my NAS thru telnet and execute there some script: python myscript.py > log.txt Will it continue ...
1
vote
1answer
200 views

How to mount/unmount webdav server directory using Terminal

I use OS X 10.10.1 and I want to mount a HTTPS webdav server directory as a volume on my local machine using Terminal. I found this utility -- mount_webdav -- which seems to work - I created a ...
0
votes
1answer
87 views

Cancelling shutdown -h command on Mac

I usually use the command sudo shutdown -h +60 from the Terminal on my Mac. Although I'd like sometime to cancel the scheduled shutdown or postpone it. Is there a command to do so? If yes, how?
0
votes
0answers
28 views

OSX Terminal Command for Detecting a Language

I am aware that OSX can detect a language as part of it spell checking. Is there a terminal command for doing this? So far I have found file which reports the language of file but it doesn't seem ...
1
vote
2answers
40 views

Make perl regex search exit with failure if not found

With grep I get a failure return code/exit status if no result is found. How can I do the same thing with perl? Basically, I would like to change the following so that it exits with status 1 if no ...
7
votes
4answers
17k views

Does anyone have a Mac Terminal script to remove hidden files?

My car stereo can play music from USB flash drives, so I asked about copying MP3s from an iTunes playlist. That worked fine, but my stereo wouldn't play the MP3 files. I eventually put the flash ...
0
votes
1answer
32 views

Copying only files without a special string in filename

I have to copy only files from a folder that don't have following string in its filename: NNNNxNNNN (a 3 or 4 digit number followed by the character x followed by a 3 or 4 digit number again -> it's ...
7
votes
2answers
11k views

How to stop and start dropbox.app in Apple Terminal?

How to stop / start dropbox in the Apple Terminal? dropbox stop works when using Oracle Linux, but not within Mac OS 10.6.8.
19
votes
1answer
8k views

Use terminal scrollbar with tmux

I know how to scroll in tmux using the keyboard, but I noticed that it looks like there's a way to use the terminal scrollbar with GNU Screen. Can this be done with tmux?
0
votes
1answer
47 views

pstopdf mac terminal width and height options

Are there any options which set width and height of outcome document of pstopdf command in terminal? I've used a2ps command to convert my Java code files into .ps file, now I want to convert .ps file ...
5
votes
4answers
2k views

Mac OS Terminal - keyboard echo breaks after ctrl-c with some applications

The only two applications I've been able to reproduce the issue with are tail and cat. If I tail -f log/development.log or any file for that matter, and press CTRL-C to quit, when I type additional ...
5
votes
5answers
5k views

Spawn a new terminal window (Mac OS X)?

I am often working in a process in the Terminal and I've set some variables and used cd and so forth. Then I'd like to open another Terminal window from there. Is there any way to do this?
7
votes
4answers
6k views

Mac OS X Terminal not logging in

I am running Mac OS X version 10.6.3 and when I open the terminal (with terminal.app or iterm) it just hangs on the login process. I've tried restarting, changing the startup command to /bin/bash, and ...
0
votes
0answers
19 views

How would I enable 'full duplex' MTU?

How would I enable full duplex 4078MTU in my MacBook Pro 2011 i7 2.8GHz? Is this possible to do? fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078 lladdr ...
1
vote
1answer
445 views

How would I restart Apache using the Terminal in Mac OS X?

This is what I’ve done but I’m really new to terminal: Jeremys-MacBook-Pro-2:~ jeremyoconnor$ apachectl restart This operation requires root.
1
vote
1answer
3k views

Perl for matching with regular expressions in Terminal?

I'm trying to familiarize myself a little with Perl to use for regular expression searches in Terminal (Mac). Now, I'm not really looking to learn Perl rigourously, just trying to find out how to do ...
6
votes
2answers
2k views

Equivalent of 'clear' command when using tail -f

I am using the tail -f command to follow an error log, and I often want to "clear" the terminal, much in the same way that the clear unix command moves everything above the top of the window. Is there ...
1
vote
0answers
158 views

Midnight Commander function keys not working

I'm using Midnight Commander in a Mac Terminal. I'm using PC keyboard, so function keys work as F1-F12 keys, but they don't work in MC. I tested what character sequence is sent with each function key ...
1
vote
1answer
50 views

Mac command-line sort files into subfolders

I want to run a command on a very large folder to sort every item into subfolders based on modification date. Can this be done with one line? I.e., all files modified in July 2013 would be moved to ...
35
votes
6answers
44k views

Mac OS X keyboard shortcuts for terminal

After googling for some Mac OS X terminal shortcuts, I wanted to find how can I go back characters on a line on the terminal or words or similar. I found ALT + B but it does not work. Do you know ...
1
vote
2answers
415 views

DTerm: How to open into iTerm2 rather than Terminal.app by default?

In DTerm, one can open a full terminal application by typing ⌘-↩ after a command entered at the DTerm prompt. In a recent release, it is noted that support has been added for iTerm2 in DTerm via an ...
2
votes
1answer
39 views

How To Login To Terminal (OSX) Without Quitting Or Closing Window

I like to keep my windows open on my work machine so when I arrive in the mornings, I don't have to go through the process of opening them all again; and opening all my files. I can pick up where I ...
0
votes
2answers
7k views

How to use Terminal to navigate into a desktop shortcut or folder in applications?

I'm on a Mac and watching a tutorial on setting up Git. I'm in the terminal and currently on the Desktop. I can us ls to list all the items on my desktop, and cd into any of the folders on my ...
1
vote
2answers
574 views

Script for toggling OS X “Show Hidden Files” in Terminal

Is there a way to toggle the hidden files visibility on/off with a terminal script? In pseudocode: if can view hidden files set com.apple.Finder AppleShowAllFiles false else set ...
3
votes
2answers
474 views

How to make ls command not show Icon? files?

I have a folder (say, Downloads) with a custom icon. When I execute cd Downloads and then ls, it displays Icon? Subfolder1 Subfolder2 How can I make the ls command skip (thus not showing) ...
1
vote
1answer
189 views

MySQL in OS X Terminal.app — how to exit mysql command prompt but continue using the Terminal?

I type mysql and enter the mysql command prompt (denoted ~mysql) (I have ohmyzsh installed also). But I can't seem to do anything within it. No commands work. To exit, I type 'exit', and get [Process ...
21
votes
3answers
20k views

How to have full directory path always shown in mac terminal (like linux terminal)

In my ubuntu terminal I have always current directory shown completely. Just like this: blabla@blublu:~/music/my_album/classical/beethoven$ But in my Mac (Mac OS X 10.6.5) terminal does not show ...
0
votes
0answers
75 views

Localhost on Mac causing system-wide problems?

I had some trouble with my 2013 MBP bogging down this summer (apple wasn't sure why...too many chrome tabs or filesystem corruption. in any event a complete reinstall fixed it). I've been doing web ...
0
votes
1answer
26 views

Setting Terminal tab to current directory and program running

How can I make the terminal tab display <name of process running (vim, bash, ruby, etc)> - <parent directory/current directory>?
12
votes
9answers
11k views

How to get Mac OS X Terminal.app and screen/vim scrolling to play nice?

OSX 10.6.3 Terminal.app Am a pretty dedicated screen user. Terminal.app line buffer and/or scroll does not seem to work for me. That is while in screen anything that goes past the top of the frame ...
21
votes
3answers
6k views

Replace OS X's shell commands with the linux versions?

The commands available by default in the Terminal in OS X, don't seem to behave like their linux versions. How can I replace all of them with the actual GNU linux commands? For example sed -i ...
0
votes
3answers
57 views

How can I see the size of each file in a particular directory in the terminal?

When using the terminal, is there a command that allows you to see the size of each individual file in a particular directory?