0
votes
1answer
15 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>?
0
votes
0answers
67 views

Mac OS X Terminal Error: undefined method `grep'

Every time I enter a command, or even just hit enter, in Terminal I get this line below the output: -e:1:in `<main>': undefined method `grep' for #<String:0x007feea31354b8> ...
1
vote
1answer
141 views

How do i unzip files from a nested folder?

Say i have the following .zip file: ZipFile.zip /zipfolder/ this.file that.file theother.file When i try: unzip ~/path/to/my/ZipFile.zip -d ~/path/to/my/destination/ ...
1
vote
1answer
244 views

Keystrokes and commands for my inputrc — key-combination for “Shift-Space”, remap “Ctrl-PageUp/PageDown” to something without Page-keys

I need to add some things to my inputrc. I'm using bash 4, as OS I'm using debian and OSX. My terminal emulators are rxvt-unicode-256 on debian and Terminal.app on OSX. My new macbook has no ...
1
vote
1answer
127 views

Tab title is wrong with ssh/screen on osx

I am doing ssh -t host screen -D -RR in OS X (10.9) terminal tabs. My ~/.screenrc is identical on all remote hosts and contain the following line: hardstatus string "%H(%n:%t)$USER %h" My ...
2
votes
1answer
83 views

time command - output to a file

comamnd line: time myprocess outputs its results: OUTPUT FROM MY PROCESS real 0m1.954s user 0m0.086s sys 0m0.052s But if I do time myprocess > outputfile.txt my outputFiel.txt ...
0
votes
0answers
58 views

Cut and Paste from OSX Terminal to Mac's TextEdit (v.1.8) Program results in partially garbled text- why?

Everytime I cut and paste from MAC Terminal (v 2.3) on my computer (mtn lion 10.8.5) to TextEdit and save as a .txt file, I notice that a lot of text gets garbled in the process. Does anyone know if ...
1
vote
2answers
277 views

Recursively zip files into .cbz-files based on folder in command line

I'm trying to figure out how to write a script to automate creating .cbz files from images in folders on OSX. My directory tree will look like this: /toplevel/ cbz/ comics/ Comic1/ ...
0
votes
1answer
162 views

Terminal mac (bash) script to extract, move and clean a WordPress install

I want to be able to copy/paste into terminal; wget http://wordpress.org/latest.tar.gz tar -xzvf latest.tar.gz mv wordpress/* . rmdir wordpress rm latest.tar.gz But I want correct wait commands in ...
1
vote
2answers
129 views

terminal.app: how to read the terminal window title

I have seen many questions about how to set the tab (or window) name, but how to get it? I have setup terminal to open 8 tabs, each tab having its own name (dev1, dev2, ... dev8) Is there any way for ...
3
votes
0answers
19 views

How do I skip the requirement to hit tab twice on a soft link autocomplete? [duplicate]

When I am in the bash terminal (Mac) and I am selecting a file, I can easily type the first part of a directory and hit tab to have it auto complete, for example: cat ~/Desk [tab] -> cat ...
47
votes
2answers
5k views

How can Homebrew print a beer mug in Terminal?

Homebrew has a neat trick of printing out little icons next to its output. Like this: If I copy paste the icon it on its own and hit enter I get the result: -bash: $'?\237\215?': command not found ...
3
votes
1answer
92 views

Mac OS X Doesnt run .bashrc by itself

When I open a new terminal I don't get the prompt I setup in ~/.bashrc or my aliases etc... If I run exec $SHELL then everything applies like it should for example: Last login: Mon Jan 7 09:02:00 on ...
1
vote
1answer
192 views

Vim text messed up on remote server

I often work on remote servers. There is one server that seems to get "confused" about the number of available columns (my best guess), but only when working in Vim (not bash). Specifically, when I ...
1
vote
1answer
319 views

OS X terminal login takes lot of time

From earlier this week my MacBook Pro's terminal is taking a lot of time (about 20 seconds) to see the bash prompt. How do I reduce this time? EDIT: While the login is in progress I tailed the ...
1
vote
1answer
147 views

Does “x-terminal-emulator” work on OS X?

Linux has a command x-terminal-emulator that will activate a new terminal emulator. And i believe it works with the set default emulator. Does OS X have a similar command or the same command? Do all ...
0
votes
1answer
153 views

Command not found on (Terminal) iMac [duplicate]

Possible Duplicate: How do I reset the $PATH variable on Mac OS X? When I open terminal and type the ls command, it says: command not found. I found a link that resolves the problem, but ...
3
votes
1answer
620 views

How to make alias/function in .bash_profile for `curl` that takes an argument?

I found this tip super helpful, for using curl to resume an interrupted file copy. The full syntax is: curl -C - -O file:///Volumes/path/to/file I would like to add an alias or function called ...
1
vote
1answer
84 views

Why does git branch info clear upon making a new tab in terminal

I've written a bash script to put git info into my bash prompt, along with still keeping the terminal's pwd in the title bar, to allow for new tabs to be opened at the current working directory. It ...
0
votes
2answers
109 views

How to find out why openning a Terminal in OS X is very slow sometimes?

Is there a way to verbosely print everything that gets executed when I open a Terminal in OS X? Sometimes it takes up to 10 seconds for the Terminal to become ready for interaction and I want to know ...
2
votes
2answers
305 views

When I paste a command on my bash prompt it is not in history — how can I add it?

When I paste a command to my OS X or Ubuntu bash prompt using CmdV, the command is not in history – even if it is executed. The command is in history only if I type it. How to enable that pasted ...
9
votes
2answers
3k views

How can you customize your terminal bash prompt with smiley faces?

I'm trying to figure out how I can customize my terminal's bash prompt to use smiley faces. What I want (as seen in the example blow) is for the cwd to be separated from the prompt by a \n and show a ...
3
votes
3answers
1k views

Ctrl + A doesn't work in Bash Terminal on OS X Lion

In bash windows using the Terminal.app on OS X Lion, I can no longer use ctrl + A as a shortcut for going to the start of the command line. Other ctrl characters like ctrl + E don't work any longer ...
1
vote
3answers
421 views

On a Mac, how can I group together commands I want run into a alias?

In my .bash_profile I have created alias to commands that I run often. What if I want to group together multiple commands together, and they should run in serial one after the other. How would I do ...
1
vote
2answers
1k views

Mac: truly detach process from Terminal.app

On Mac OS 10.6.6, I want to make a bash alias or function that will run Google Chrome. Launching Chrome is easy: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome". The problem is how to ...
1
vote
1answer
304 views

bash terminal - prompt cursor changes from $ to > upon entering invalid command

I used the Terminal application in Mac OS X to remove some hidden files (i believe this uses the bash shell by default). I inadvertently misspelt my command and, upon hitting the Enter key, my prompt ...
0
votes
2answers
816 views

Terminal.app bash character echoing messed up

I’m having a problem with my terminal for a while now. It seems the combination of bash (or rather readline) and Terminal.app gets confused somehow when I hit the cursor-right key to exit ...
10
votes
2answers
1k views

Mac Terminal/iTerm history cursor problems

So often, I run a command in either Terminal.app or iTerm, press the up arrow to go back to edit it, and the cursor jumps to the line above or somewhere totally in the wrong place. It especially ...
2
votes
3answers
684 views

What escape code do I need in PS* to make sure terminal is back in normal settings on shell prompt?

Sometimes I accidentally cat some binary data; sometimes some ncurses program crash - for plenty of reasons terminal can end up in bad state, requiring manual reset. This is happening too often. Such ...
0
votes
3answers
2k views

“-bash: ls: command not found” error in Terminal on Mac. How to correct it?

I edited the .profile file to add a new PATH. I believe I set it wrong such that most commands become unavailable. Since I can't use ls or vi commands to edit .profile again, any idea how I can ...
4
votes
2answers
408 views

Mac Terminal.app: Force '^C' to be printed when editing current prompt, then aborting it

This is the opposite of Prevent “^C” from being printed when aborting editing current prompt. I'm using Bash. When I'm editing the commandline in Bash, and I hit Control-C to abort the commandline, ...
31
votes
5answers
39k 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 ...
40
votes
5answers
17k 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.
1
vote
2answers
897 views

Why can't I read or write a file whose owner is root and permission is 707 in Terminal.app on Snow Leopard?

This is what happens - but why? liuxiang@MacBookPro: ~/casecode/sh $ ls -l sa -rwx---rwx 1 root admin 55 10 21 00:07 sa liuxiang@MacBookPro: ~/casecode/sh $ cat sa cat: sa: Permission denied ...
11
votes
3answers
4k views

Bash on Snow Leopard doesn't obey terminal colours

With the new version of Snow Leopard, OS X upgraded the bash version to GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0). Now, my .bashrc sets the following settings: # Colors export ...
9
votes
1answer
2k views

How do I make OS X set the terminal title back to the original title when coming back from ssh?

Starting on OS X, I ssh into foo (a Linux box). My terminal title changes to foo. I then ssh into bar (another Linux box). My terminal title changes to bar. I log out of bar. My terminal title ...