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

2
votes
1answer
405 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 ...
2
votes
0answers
92 views

Activity Monitor confusion

I have two java programs that run forever until I terminate the process, I start both at once using a script.... Cobrakai$more startCapture nohup startCaptureA.sh & nohup startCaptureB.sh & ...
2
votes
0answers
61 views

How to prevent OS X's 'screen' command from resizing the terminal upon entry?

I usually run my terminal sessions in 132 character wide mode in iTerm. However, when I start the 'screen' command, it re-sizes the terminal back to 80 characters. Is there a way to prevent this?
1
vote
4answers
218 views

How to get to know OS X/Unix better? [closed]

Not sure how to ask this but this problem has troubled me for so long. I'd long been a DOS/Windows user until about 12 years ago when Mac OS X first came out I turned to the Mac, and stayed here ever ...
5
votes
3answers
12k views

Merging Multiple CSV Files without merging the header

I need to merge multiple .CSV files (using the cat command) but without copying the header for each file. What's the best way to accomplish this task?
1
vote
1answer
151 views

Add color to custom ls alias

I created an alias to display permissions in octet format: alias lso="ls -l | awk ' { k=0; for (i=0;i<=8;i++) k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i)); if (k) printf("%0o ",k); ...
1
vote
0answers
387 views

Building netgen on Mac OS 10.9 - problem with tcl and tk

I am a very beginner in building from source on Mac. (It's my first request here...) I am trying to build netgen and ngsolve. Mac OS 10.9, Xcode 5.0.2, macports version 2.2.1 After installing tcl ...
1
vote
1answer
587 views

How do I change mouse settings instantaneously from Terminal?

My school has a bunch of Macs that are always logged in as Guest and have very annoying default settings (natural scrolling, no secondary mouse button, etc), so I am trying to write a terminal script ...
0
votes
2answers
793 views

what shell would you recommend using on mac? [closed]

I'm new to Mac (using Mavericks) i thought to install zsh. Do anyone has a recommendation for a useful shell for mac?
4
votes
2answers
199 views

How to recursively edit path of symlinks?

This is an additional question that began with this one - How to edit Symbolic Links in OS X? Now that I know how to edit the path symlinks point to, I'm trying to figure out how to do this ...
13
votes
2answers
6k views

How do I reset the scrollback in the terminal via a shell command?

When using Terminal.app, you can clear the screen by using the shell builtin clear or by pressing ^+L (Control-L). However, all this does is push the current screen content back one screen height ...
1
vote
1answer
337 views

HEX-/RGB-colors in Terminal

I'd appreciate to be able to use my Linux colorscheme in Terminal. Is there a way I can specify HEX-codes or maybe RGB-values?
1
vote
1answer
67 views

Mavericks - strange behavior creating simlink in root directory

I want to create a simlink called /home, that points to /Users. The command sudo ln -s Users home (executed in /) should work; at least, I've demonstrated that the syntax is correct by creating a ...
-5
votes
3answers
18k views

How to press Control key on Mac

I cannot seem to find out how to hit the ctrl key on a Mac. When I open a terminal and I want to exit an editor such as nano as I cannot since I don't know how to exit and save. How would I do this? I ...
2
votes
2answers
762 views

Unix command to recursively copy JPG files in a complex directory tree

I have a large directory tree structure that contains multiple JPG files in each directory root and their subsequent subdirectories. I need to recursively extract a single JPG file from each directory ...
4
votes
3answers
177 views

Is there a way to set/unset the execute bit on a file in osx 10.6.8 without using terminal (or bypassing it)?

I would like to do the following: chmod +x filename.txt without using the terminal. Is there a way to bypass the terminal and invoke a kernel system call ? I'd rather not write a program to do ...
1
vote
2answers
1k views

Symbolic links, why doesn't this work:

me$ ln -s ~/x/y/ ~/Desktop/ ln: /Users/me/Desktop//: File exists Why does this attempt at creating a symbolic link to ~/x/yon the Desktop now work? The only way I can seem to get something like a ...
4
votes
1answer
345 views

Exclude all .git or .svn folders from Spotlight index

I would like to exclude all the .git and .svn folders on my hardrive from the Spotlight index. I know I can manually add them through the GUI but since they are many of them, and often new ones, it ...
11
votes
3answers
21k views

What steps are needed to create a new user from the command line on Mountain Lion?

What commands (or script) can create a fully functional user account on Mountain Lion, running only from the command line via terminal or ssh. It looks like an existing pair of answers might work, ...
1
vote
1answer
123 views

Where is the specific driver for my GPU located

I am trying to run a bitcoin miner (bfgminer), I know this is not efficient but I want to do it anyway. The mac in question is a MacMimi running an Intel HD Graphics 4000 GPU and Intel(R) Core(TM) ...
1
vote
1answer
4k views

Mavericks SSH keys and Keychain

Before Mavericks I could use Keychain to store my SSH keyfile passwords The connection between private key and Keychain was like this: ssh-add -K /path/of/private/key However now in Mavericks, the ...
0
votes
1answer
308 views

Time Machine Backups Gets Stuck With 100% CPU via tmutil

Okay, so I recently decided to try switching my Time Machine backups over to tmutil so that I could gain more control over exactly when they ran, but also so I could run some extra stuff before and ...
8
votes
2answers
4k 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.
4
votes
2answers
147 views

I added this to my .bash_profile but I neglected to label it and forgot what it means exactly

I remember broadly what it does, but not specifically: if [ -f ~/.bashrc ]; then source ~/.bashrc fi What is the exact purpose for it again?
1
vote
2answers
4k views

zsh themes loaded but not working

I set theme in .zshrc file: ZSH_THEME="random" And when open new tab, it shows that new theme is loaded: [oh-my-zsh] Random theme '/Users/maks/.oh-my-zsh/themes/gozilla.zsh-theme' loaded... mac ...
1
vote
1answer
47 views

Substitue Escape for Control U in Terminal

I would like to change bash keybinding so that the Escape key has the same effect as Control U. For example, if I tap the Escape key, the current Terminal command will be cleared out (which is what ...
3
votes
2answers
11k views

finding the remote IP address used by a mounted SMB share

Using Finder, I have mounted an SMB share which resides on my NAS . When I use the mount command, the NAS is listed with the name it advertises (nas-smb). mbp:~ me$ mount /dev/disk0s2 on / (hfs, ...
0
votes
2answers
4k views

AppleShowAllFiles Command not working in Mavericks OS X 10.9

I have looked everywhere, but the command defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder and all variations thereof does not work since I upgraded to Mavericks. Why is this?? ...
0
votes
3answers
444 views

Permanently show hidden directories

I am trying to repair a friend's USB drive that got a virus. All directories became .lnk and the original ones were hidden. I don't know how to permanently show the folders. I've used sudo chflags ...
0
votes
1answer
225 views

How do I view .nfo files in Terminal?

I'm trying to open an .nfo file correctly with the mac terminal (eventually with iTerm2) . I've tried it already with vim: vim file.nfo :set encoding=cp437 But it has not helped. Maybe there are ...
2
votes
1answer
2k views

How to patch a file that resides in /Applications (patch can't find file to patch at input line)?

I am trying to patch 5 files within an Mac application bundle using the Terminal patch command. The files to be patch are specified using an absolute file path (the file name and path start with a ...
1
vote
1answer
416 views

How to undo “sudo rm -rf /etc/apache2/other/+php-osx.conf”

After I did this: sudo unlink /usr/local/php5 sudo rm -rf /usr/local/php5-* To remove the supplemental configuration file that was installed with the updated PHP software, you may be able to remove ...
1
vote
1answer
190 views

Launching Terminal app starts XQuartz

Whenever I start the Terminal app in OS X Lion, XQuartz starts automatically. Is this intentional? I recently turned off much of the resume functionality because too many things were starting without ...
1
vote
2answers
407 views

Is there is a way to send a local message from a Mac to an iOS device *without* the Internet?

I know I can send Prowl notifications from OS X to iOS, but that requires going over the Internet. I'd like to accomplish the same thing, except that I want to be able to be able to do it without an ...
3
votes
2answers
3k views

How to copy all files with extension/filetype in terminal?

I want to copy all files in ~/Desktop with the extension .jpeg to my flash drive. How can I do this in the terminal?
3
votes
2answers
2k views

Uninstalled zsh, terminal gone weird

I uninstalled zsh pretty soon after I installed it as I realised I had got used to the normal Terminal. The uninstall went successfully and I restarted Terminal, but now it displays my computer-name ...
1
vote
1answer
85 views

Splitting LexisNexis text file

For my research I have a number of text (txt or doc) files. These have a large quantity of newspaper clippings in them. I'd like to split these text files. Each clipping starts with document X ...
1
vote
1answer
269 views

Linking manuals from Homebrew

Whenever I install a software with Homebrew and I try to view the manual I get an error stating: No manual entry for <name of program>. As an example, wget: when I type $ man wget No ...
1
vote
1answer
75 views

How to stop 'locate' from using databases for unmounted volumes?

Despite the claim made in the answer to this question: Can Spotlight show results for disconnected drives? This is exactly the behaviour I am seeing and I don't want it! E.g. wms:~ alan$ ls ...
3
votes
2answers
3k views

Getting launchd to read program arguments correctly

I have a launchd script where the command I'm trying to run is erroring (apparently that's not a word, it is now), complaining of improper usage. The specific error I'm getting is the command's usage ...
9
votes
3answers
119k views

How do I run terminal in sudo mode?

I was trying to install npm, and I got npm ERR! Error: EACCES, Permission denied '/usr/local/lib/node_modules' npm ERR! npm ERR! Please use 'sudo' or log in as root to run this command. npm ERR! ...
6
votes
2answers
3k views

What option should I give the sudo command to have the password asked through a graphical interface?

This problem has ben bugging me for a while now. Every now and then, I need to write a script file that should execute sudo commands. I do not necessarily know in advance that I will run as sudo so I ...
0
votes
0answers
14 views

Command Line Tips and Tricks [duplicate]

==>> What are the most useful Unix shell "one-liners" that you use? <<== Here are a couple of mine to get the conversation started: 1. Repeat the previous command with a substring replacement: ...
1
vote
2answers
1k views

What does Control key do, other than its usage in terminal and right click?

So far I have been using control key to: Send control commands to terminal Occasionally do right click Does the key have any other function?
0
votes
1answer
759 views

In iTerm, why is a command shell's command not picking up things on my $PATH?

I've got a script in my ~/.bin directory that changes iTerm's background before starting an SSH session (as detailed here, script slightly modified from this version). If I start a regular login ...
2
votes
1answer
660 views

How to connect to an already open Terminal session on another Mac

I am running Mac OS X 10.7 on a MBP and OS X 10.8 on a Mac Mini. I can connect to the Mini via ssh without any issues. I am running GNS3 (Network simulation) on the Mini and have configured it so that ...
2
votes
1answer
833 views

change terminal language os x

I have a Mountain Lion macbook and it's default locale is english, it's keyboard is english (US) as well. I need to change the language that the terminal replies to Swedish. For example, Instead of ...
2
votes
0answers
124 views

How can I revoke an applications access to keychain passwords from the command-line?

Applications can be granted permanent unprompted access to passwords. You can add and revoke these privileges using the Keychain Access utility. (See this answer) I'd like to be able to revoke from ...
8
votes
2answers
6k views

Changing Preview.app's default View state in Lion

One thing I dislike about Preview.app in Lion is its defaulting to Continuous Scroll as the view option when a new PDF document opens. My recollection is that previous behaviour was for the last-used ...
2
votes
0answers
35 views

Terminal app Tabs, how to position next to current tab instead of at the end

I use Cmd-T all the time to open new tabs, and it's set to use the same directory. However, it positions the new tab as the last / far right tab in the window, instead of next to the current tab that ...