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).
5
votes
3answers
573 views
When is the locate database updated?
I use the locate command in Terminal regularly. When does its database get updated? On other systems, I could run updatedb as root to force it to update.
Note: I know using mdfind to search with ...
5
votes
2answers
1k views
5
votes
1answer
210 views
Why is mdfind only returning my most recently accessed files?
I've imported most of a javascript code base via mdimport (using the packaged SourceCode.mdimporter provided by Xcode) and it succeeds. However, mdfind only ever returns to me at most two results, ...
4
votes
5answers
9k views
How to cd to a directory with a name containing spaces in bash?
I tried cd "~/Library/Application Support/"
-bash: cd: ~/Library/Application Support/: No such file or directory
also cd ~/Library/Application Support/
-bash: cd: ~/Library/Application Support/: No ...
4
votes
5answers
6k views
What's a good terminal manager for OS X?
The Terminal.app application from OS X is quite good but it lack some functionality that I find really important like: ability to setup SSH profiles for connecting to different servers and ability to ...
4
votes
3answers
2k views
How do I rename the Downloads folder (in Lion)?
For whatever perverse reasons I wish to rename the Downloads folder to Temp. I would also be happy with a way of making it appear to me, in both the GUI and the CLI, as Temp. I am aware I can do this ...
4
votes
3answers
19k 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!
...
4
votes
5answers
239 views
Installing the most recent version of Ruby on Snow Leopard
I downloaded and compiled the latest version of ruby 1.9.2 which was installed in /usr/local/bin/ruby, however the system officially recognizes /usr/bin/ruby which is only 1.8.7 which came installed ...
4
votes
3answers
243 views
In terminal, modify the text that comes before $
In terminal I can always see which path I'm in:
macbook-romeo:School romeovs$ echo "example command"
which I find quite useful. Yet there is a lot of unnecessary stuff here too: macbook-romeo is ...
4
votes
3answers
4k views
Use MacVim as standard Terminal?
I used to love the terminal.app for many reasons.
I especially liked the way I could navigate to a file and edit using vim it all in one app, without having to leave the keyboard.
But, since the ...
4
votes
2answers
421 views
Is there a better way to shutdown/restart OSX?
Whenever I want to shutdown/restart OSX I click on the menu, select shutdown, and then click the box for not saving the session, and then click OK. Then there's always at least one program that ...
4
votes
4answers
815 views
Listing the terminal commands available for Mac OS
I would like to make more use of the terminal. Is there a command I can use that could list for me all the available command of the Mac OS? I am using Snow Leopard.
4
votes
3answers
492 views
4
votes
2answers
1k views
What is the difference between .bash_profile and .bashrc?
To make an alias for the Terminal in OS X, you can either put the aliases in .bash_profile or .bashrc. What is the difference between the two and why would I choose to put aliases in one and not the ...
4
votes
2answers
448 views
Terminal doesn't show badge - how to enable?
Opposite to another question here I want the badge count to appear.
I have the "resume" function enabled in my Lion. Is there another setting that's responsible for the badge?
To clarify I run tail ...
4
votes
1answer
748 views
reattach terminal tab to another window
Suppose you have a terminal with two tabs. You click, drag, and let go one of these tabs and it becomes an independent terminal window. After a while, you want to take this terminal window and ...
4
votes
2answers
275 views
Is there a UNIX-style triple click to select path in Terminal.app?
In Red Hat, if there is a path somewhere on my terminal window and I triple click it, the whole path is selected. I can then easily copy it using middle-click or a regular copy-paste.
This doesn't ...
4
votes
2answers
164 views
How can I have my shell always start in a certain directory that is not my home directory
I've tried putting
cd /Users/my_name/my_directory/structure
in both .bashrc and .bash_login but neither works, i.e. when I open a new terminal window I am in my home (/Users/my_name/) directory.
...
4
votes
1answer
2k views
How to save and exit “nano .bash_profile” in Terminal?
I need to add some line to nano .bash_profile in Terminal. Then:
1) I enter with this command line: nano .bash_profile
2) Add the line I need
3) now I don't know how to Save and Exit
I thought it ...
4
votes
3answers
1k views
sourcing bash profile for root users
Apologies in advance if this question is going to annoy the hell out of everyone as I appreciate, it's been asked in various ways many times before. Please be assured, I have read the archives and ...
4
votes
4answers
15k views
How can I list all user accounts in the terminal?
How can I list all local user accounts (whether logged in or NOT so 'users' or 'who' is no good) in the terminal on a mac? OS X version is 10.6.8.
I have seen this suggested - dscacheutil -q group
...
4
votes
2answers
793 views
Decompressing .sit file
I have recently downloaded a .sit archive file.
Is there a way to decompress it at the command line?
4
votes
1answer
219 views
What does Force Quit do in OS X?
How does the GUI interface for force quitting applications (⌘+⌥+esc) work?
e.g.
Does it work like killall Finder which would send a TERM signal by default?
4
votes
5answers
154 views
Learn about basic OS X applications
I have been a Windows user and have recently started using OS X (I have Snow Leopard on my machine).
I wanted to learn about the basic applications in OS X (e.g. Terminal) and other commonly or some ...
4
votes
2answers
1k 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 ...
4
votes
1answer
166 views
Command line utility to create screenshot
Is there some command line utility to create a screenshot of the my screen and store it as png? (Preferably one in the system, without need to install anything new)
4
votes
3answers
7k views
uh oh. -bash: ls: command not found
I installed the most recent mac update to OS X Lion (10.7).
After I did that, my terminal won't recognize normal commands. I type 'ls' and get:
-bash: ls: command not found
I figured I'd try to ...
4
votes
2answers
179 views
Terminal issue with export PS1=“”
So I tried to change the output of my terminal prompt but when I try something like /W it just puts the /W not the path. For example export PS1="/W $ "turns my prompt into "/W $"
4
votes
2answers
457 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?
4
votes
1answer
220 views
Why does my Terminal command line screw up like this? (bash's fault?)
When I use the command line history ( CtrlR , CtrlP )
The command line screws up like this:
The cursor is supposedly located at the end of the line ( just pressed CtrlE )
If I press enter, just ...
4
votes
2answers
157 views
Why can't this process terminate?
Just recently I ran into an issue where my network program couldn't bind to a port because it was already in use. I opened the activity monitor and realized it (named "server") was already running ...
4
votes
1answer
2k views
How do I remove the hostname from the bash prompt in Terminal?
My prompt in Terminal currently looks like:
Dzulhelmis-MacBook-Pro:~ myusername$
I want it to be as short as possible, maybe at least no hostname there. How do I change my bash prompt?
4
votes
4answers
1k views
Creating a virtual serial port
I'm trying to create a pair of virtual serial ports on my mac. This is fairly easy to do with many shareware programs on a PC. I figured there would be some uber-powerful shell command to do this in ...
4
votes
2answers
2k views
Firing up Terminal from an Automator Workflow?
I quite often use the python -m SimpleHTTPServer command in the Terminal to fire up a webserver for testing apps. Having just learned the basics of the Automator, I figured this would be a great use ...
4
votes
2answers
2k views
Linux 'Byobu' equivelant for mac
So at home ive been a linux user for a while, and frequently use byobu in the terminal. After a little searching I was unable to find anything like it for a mac, which I now have to use at work. I'm ...
4
votes
5answers
1k views
Open new terminal window in current space, regardless of other open terminals in other spaces
When using Spaces on Mac OS X trying to open a new terminal instance results in focus being pulled to whatever space has the most recently accessed terminal window. With Finder I can click on the ...
4
votes
2answers
939 views
How can i have makefile/shell script call /Applications/application.app?
OS Mac OS X 10.6.6
emacs 23.2.1
I'm currently trying to install magit on carbon emacs using their proposed make solution. I'm an almost complete makefile newby so I might be on the complete wrong ...
4
votes
1answer
94 views
What is the ellipsis badge on minimized terminal app in the dock mean?
I have another terminal window minimized next to it in the dock and it doesn't have the ellipsis. Also it doesn't have any running processes. What does it mean?
4
votes
2answers
2k views
Can I create a Desktop Shortcut/Alias to a Folder from the Terminal?
I'd like to create a desktop shortcut to a specific folder, buried deep within ~/Library/. Library is Hidden by default in Lion, and I'd like to keep it that way, for a variety of reasons. Is there a ...
4
votes
3answers
682 views
Force Terminal to Use Gedit for any Text Editing - not vim
I'm learning to program. While following this mission, I typed git commit, which opened up vim. I don't know or want to know vim (no offense to vim lovers). I'd like to have:
terminal open gedit ...
4
votes
1answer
357 views
How can I merge two similar-but-not identical folders?
I have a folder (which is filled with many many sub-folders and files) which is on a FireWire drive [source] which I am trying to move to a USB drive [destination].
I am trying to move all of the ...
4
votes
3answers
2k views
How do I use FTP via the command line to download all files?
I tried to use Filezilla and Cyberduck for file transfer over a simple FTP server. The problems I have is:
Filezilla: When I use it for file transferring, I check the "Activity Monitor", the "% CPU" ...
4
votes
1answer
345 views
Is less(1) missing lesskey functionality?
less(1), the terminal file pager, seems to be missing lesskey(1) and the ability to rebind the keystrokes in less. The docs claim it's there, but it doesn't work. Am I crazy or is Apple's version of ...
4
votes
2answers
398 views
How do I maximize a window vertically? [duplicate]
Possible Duplicate:
What Window Management Options exist for OS X?
Is there some keyboard shortcut, mouse gesture, or add-on I can install that will allow me to maximize terminal windows ...
4
votes
3answers
627 views
How do I delete a locked, invisible file in the Trash?
On an external disk (that contains a clone), the /.Trashes/501/Users/myusername/Desktop folder contains (within some subfolders) a locked invisible file that I cannot delete. The whole folder starting ...
4
votes
3answers
745 views
Can I change the color of my Mac OS X Terminal window depending on which server I am ssh-ed to?
I'd like to have the background as black for server 'foo' but have the background be say gray or blue for server 'bar'.
I am worried I'll run the wrong command on the wrong ec2 instance because all ...
4
votes
5answers
2k views
Is there a beginners guide to Unix from the OS X point of view?
I'm hoping to build on my embarrassingly-limited knowledge of the command line, and I know there are a ton of great resources out there. I'm wondering if there are any books or other resources that ...
4
votes
2answers
280 views
How to reset the terminal before command execution?
I've been looking at spicing up my Terminal experience by among other things, adding some color. I used the tput command to build a nicely looking prompt. This is part of my .bash_profile:
...
4
votes
1answer
4k views
How can I move Dashboard widgets to the desktop in Lion?
In the OS X Terminal, there is a command that allows me to drag Dashboard widgets onto my desktop. In OS X Lion, the Dashboard became a Space. I am no longer able to use this command. What is a ...
4
votes
4answers
1k views
Monitor a folder for changes, and run a command when a change is detected
Is there a simple way to automatically run a (Terminal) command every time a file is changed in a specific folder?
This should be possible via the command line, or a system built-in application, no ...