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).
4
votes
1answer
530 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 ...
4
votes
3answers
2k views
How do I restore my .bash_profile?
I've accidentally overwritten my ~/.bash_profile file.
Does anyone have a "sample" one I could copy, or know where I might be able to find one?
4
votes
2answers
622 views
Is there a way to get the date of the first boot of an old mac?
Is it possible to read the date when a mac first booted via terminal or system information GUI?
Maybe there's a file set at this moment.
4
votes
1answer
499 views
Terminal PS1 and colors
I am used from Linux to have a colored prompt in my shells and also want to implement that in my OS X Terminal.app. The Terminal reacts differently though. If I use my normal PS1 code the right side ...
4
votes
2answers
10k views
How do I convert a suitcase font?
I have a font set - Type: Font Suitcase
I am sure I have used a terminal command to convert it to a TTF or OTF. I don't really want to pay for software to do so. What is the best way of converting ...
4
votes
2answers
139 views
Is there a list of commands unique to the OS X terminal?
I tend to find out about unique OS X terminal commands piecemeal. As problems arise, or as I read askdifferent, I'll find out about handy things like mdls and mdfind.
Is there a place that lists all ...
4
votes
1answer
458 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 ...
4
votes
1answer
1k 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"
...
4
votes
1answer
59 views
Disable line wrapping for output in the Terminal
I often read outputs in the terminal that get wrapped as they are too long. Since there is no way that I can modify the printed output, I need to let the Terminal allow for horizontal scrolling.
Is ...
4
votes
2answers
397 views
What terminal command or program can list an SSD's Power On Hours?
I'm looking to script using the unix shell the retrieval of SSD (and HDD) data that disk utility shows in the information window.
I'm immediately interested in the Power On Hours and Power Cycle, ...
4
votes
2answers
244 views
Change the default action to open executable files in the editor instead of Terminal
When double clicking an executable file (without a file extension) in Finder, it opens in Terminal by default. I can change that to any other application for this single file, but I cannot change the ...
4
votes
1answer
1k views
How can the 'mail' command be used?
I've had my first Mac for about five months now. Though, even when I was a full-on Windows user, I never did things through a command line; I was pretty much for the GUI all-the-way..
But now that I ...
4
votes
1answer
508 views
Using screencapture when remotely logged in to a headless mac via ssh
I'm trying to use screencapture from the terminal, when logged in over ssh, to a mac that has no screen attached. I can screen share to the machine, so I'd like to capture the same display.
However ...
4
votes
1answer
10k views
How do I remove a user via single user mode in 10.7?
I occasionally will setup a user's machine that has been in for repair beyond the simple re-install of the OS. For example: install a new hd, install the OS, create a user, install updates and then ...
4
votes
2answers
117 views
Can I make the mouse hairpin in the terminal more visible?
It often takes me a while to find the mouse crosshair when working with Terminal.app. Is there a way to make it more visible?
4
votes
1answer
4k views
how to start/stop/restart processes
As a new comer from Windows OS, I wonder how to start/stop/restart a service on Mac OS X Snow Leopard 10.6.8 ?(it's straight forward on Windows using its Task Manager).
I tried Activity Monitor, but ...
4
votes
1answer
625 views
SSH sessions hang after VPN reconnect
I am a new user to OS X (MacBook Air, 10.6.7) migrating from Ubuntu and extremely happy with it. I use terminator running on X11 for my terminal program, and I'm using SSH: OpenSSH_5.8p1, OpenSSL ...
4
votes
3answers
907 views
Is it possible to hide the scrollbar in Terminal?
In the 10.4 or maybe 10.5 versions of Terminal.app it was possible to hide the scrollbar completely. Does anyone know if this is still possible in the 10.6 version of Terminal.app?
4
votes
1answer
144 views
How to reset $PATH?
I was trying to add something to $PATH and it went totally wrong. I now can't run any commands such as ls. I've looked at this answer and used the following lines:
...
4
votes
1answer
143 views
declare -x messages appear in my terminal. How can I get rid of it?
declare -x Apple_PubSub_Socket_Render="/tmp/launch-qoybJQ/Render"
declare -x Apple_Ubiquity_Message="/tmp/launch-DWchNf/Apple_Ubiquity_Message"
declare -x COMMAND_MODE="unix2003"
declare -x ...
4
votes
1answer
208 views
Any way to write the Terminal scrollback history?
I would like to open a new tab in Terminal with custom scrollback history. The primary use-case is to "fork" an existing tab such that both tabs contain the same scrollback history, but more generally ...
3
votes
5answers
4k views
using terminal to copy a file to clipboard
I got a file on desktop, file name is ded.html. To copy the file, I click the file and press cmd+c.
Now how would I do the same thing using terminal ?
3
votes
2answers
378 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
3answers
421 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 ...
3
votes
2answers
1k views
What terminal commands are new or updated in Mountain Lion?
Where can I find a list of new or updated terminal commands or features for Mountain Lion?
Lacking any list, does anyone have a sugguestion on how to generate that list? (some combination of ls ...
3
votes
4answers
865 views
How to list all files in directory excluding any that start with a dot?
I'm currently using the command
find /Volumes/DriveName > driveName.txt
to create a file listing of all files that are on the drive.
How could I modify my command (or what would be a better ...
3
votes
2answers
492 views
Is there a fullscreen Terminal app that is faster than iTerm?
I am used to using the Terminal in full screen on Ubuntu. On Apple, the native Terminal app doesn't do full screen, and iTerm, which does, is very, very slow when you use a multiplexer like tmux in ...
3
votes
5answers
188 views
Are there any global key combinations suitable or specifically reserved on OS X for user assignment?
I'm trying to identify an appropriate global hotkey to set in iTerm2's preferences for showing/hiding it:
I'd like to avoid any conflicts with other applications' hotkeys or other future use. Are ...
3
votes
2answers
1k views
How to clean ._AppleDouble files from unix packages?
Introduction
Here's my problem. On occasion, I create the odd deb package using dpkg-deb (e.g., dpkg-deb --build "folder" file.deb). The problem is that any file with an extended attribute, carries ...
3
votes
3answers
578 views
Is it possible to automate FTP in Terminal?
I want to add an FTP command to my crontab to automatically download a file. How do I do this?
3
votes
6answers
1k views
How can someone coming from Windows learn Mac OS X file system and Finder?
I have recently purchased a Macbook Pro and I am very impressed with the machine and OS X. Coming from Windows the one thing I have struggled with is the file system and the Finder application. I ...
3
votes
2answers
150 views
Are Bash, Bourne, and Korn shells compiled into one binary in OSX?
On OSX 10.8, if you compare the binaries for bash, sh, and ksh, a few different shell options, they are the same size. If you take it further and cmp the binaries, there seems to be only a ...
3
votes
3answers
76 views
After typing sudo I can no longer autocomplete commands by pressing Tab
In a Terminal, if I type beginning of any command by pressing tab I can see the rest of that command.
However this feature does not work with any words I type after sudo.
How can I complete command ...
3
votes
1answer
168 views
In terminal, how to get “say” to say things “right” ? ie using custom phonetics?
I'd like to use "say" in the terminal to create audio files with a custom phonetic dictionary, or at the very least, say things how I think they should sound. From my understanding, this can't be ...
3
votes
2answers
542 views
Will a Perl script still run after I log out of my user account?
I have started a Perl script from the terminal that runs in the background:
>perl myScript.pl &
If I logout, will it stop my script from running?
Thanks!
3
votes
1answer
423 views
Move to Start of Line in Terminal.app
Is there a quick key combo that will allow me after typing some stuff in the OSX terminal to move back to the beginning of that line? I have tried different things, and was wondering if there is a ...
3
votes
2answers
259 views
Can “mdfind” search for phrases and not just unordered words?
Is there a way to search for an exact phrase using the mdfind utility? For example, I created two text documents titled "test1" and "test2". The contents of "test1" are:
I love Apple
And the ...
3
votes
3answers
309 views
Terminal window as its own app
During my work day as a software developer, I frequently have multiple Terminal windows open, each dedicated to a specific purpose and directory. I switch between them on a regular basis.
I'd like to ...
3
votes
1answer
210 views
How do I restore a previous version of my ssh keypair files?
I was following the Github tutorial and I generated a new SSH key pair. But now when I'm online, Google keeps throwing up SSL errors (and so does everywhere else with SSL, for that matter). What ...
3
votes
4answers
330 views
How do I gain permission to generate ssh keys on my Mac?
I tried to generate ssh keys for GitHub (access through SSH in terminal), but I do not have access to the .ssh directory.
I tried to ls -l ~/.ssh, but I got this error ls: .ssh: Permission denied
I ...
3
votes
2answers
2k views
How can I install themes for Terminal?
I am rather new to Mac, but I am trying to get familiar with Terminal and I want to change its theme. I am a bit confused on how to go about installing Solarized themes I am seeing so much of around ...
3
votes
1answer
1k views
How do I send C-/ (that is, control-slash) to the terminal?
I'm trying to run Emacs in a terminal. I've turned on the "use option as meta" in terminal preferences and so it's about 95% working right.
The key sequence ctrl-/ (or in Emacs notation C-/) is ...
3
votes
2answers
1k views
open new terminal tab in the same directory with the active tab
In GNOME Terminal of Ubuntu when you open a new tab the new shell will automatically start you in the current working directory of the active tab shell.
E.g. if in the active tab shell I am on ...
3
votes
4answers
302 views
Opening a new Terminal window when it's running on another desktop
I open a lot of terminal windows. I also make use good use of tabs & multiple desktops.
Normally I launch Terminal.app with Spotlight. But if Terminal is already running on another desktop, it ...
3
votes
1answer
70 views
How to launch pdf viewer from the terminal
I'm working using LaTeX, since I compile the document in the terminal, it would be much easier for me to open it in pdf viewer directly from the terminal.
I'm using OS X 10.8.2 in Polish, so I'm not ...
3
votes
2answers
228 views
How can I change Terminal so that I don't have to press ESC every time I want to type a meta-modified key?
Currently in emacs/terminal, I have to press ESC every time I want to send an escaped keystroke, eg: to go forwards two words, I have to press:
ESC+f; ESC+f
How do I change the system so that I ...
3
votes
3answers
2k views
iTerm as a slide-out terminal from the top of the screen
I have installed iTerm2 and was hoping I'd have something like guake (Yes I just switched from Ubuntu). I mapped the hotkey to a button of my choice and it works fine, but I miss the ...
3
votes
2answers
194 views
How to search for a file by a hash value with bash script (terminal)?
I am writing a script for Mac OS X Lion 10.7 and I would like to know how I can search for files based on their SHA1 hashes. I would like to search the whole file system for the file(s) I will be ...
3
votes
1answer
299 views
Is it possible to open in default browser a URL from command line reusing same tab?
I know that I can use open command to open a URL in a default browser like:
$ open http://google.com
But what I would like is to execute a similar or same command to open different URLs one after ...
3
votes
1answer
439 views
Disable visual bell animation in Terminal
The title says everything, how can I disable the visual bell animation in Lion?
It is annoying and useless, visual bell should be fast, not fancy!
I don't want to disable the visual bell, just the ...