EzDevInfo.com

terminal.app interview questions

Top terminal.app frequently asked interview questions

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 requires an annoyingly additional "" argument. Also, it only works with text files. This is useless.


Source: (StackOverflow)

Can I specify double-click selection delimiters in Terminal.app?

In Mac OS X's Terminal.app, I'd like to set my own selection delimiters such that if I have the text foo.bar.baz and double click bar, only bar is selected.

Is this possible and if so how?


Source: (StackOverflow)

Advertisements

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.


Source: (StackOverflow)

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

?


Source: (StackOverflow)

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 some other shortcuts, or how can I customize them or links to cheat sheets?


Source: (StackOverflow)

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 terminal.app.

I didn't find any answer on the official documentation.

Thanks for your help.

Update: ShellTo is a great alternative to Go2Shell and supports iTerm2


Source: (StackOverflow)

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 terminal output including colors?


Source: (StackOverflow)

What's the difference between ^C and ^D for UNIX/Mac OS X terminal?

When I try to stop something, I use ^C and sometimes ^D in terminal.

What's the difference between the two? Why some program doesn't respond to ^C, but ^D. Why the Terminal.app just quits when I use ^D?


Source: (StackOverflow)

Mousing and Page-Up/Down in Terminal for Mac OS X

Compared to *nix, Terminal.app seems pretty lame. How can I get it to:

  • Send Page-Up/Down to an application, instead of just scrolling the terminal output
  • Mouse around in vim. set mouse=a isn't helping.
  • All of the above while SSH'd into another machine

Source: (StackOverflow)

enabling colors in the python interactive shell on OS/X

I have just modified my .bash_profile so as to have colors in iTerm and Terminal.

Now, I want to enable syntax highlighting for the Python interactive shell, IDLE-style.

How to do that?


Source: (StackOverflow)

Resume Zsh-Terminal (OS X Lion)

OS X Lion has "Resume" feature, i. e. when you reopen an app it restores all windows and their contents. That works for Terminal as well. But if you use Zsh instead of Bash it doesn't restore opened directory. How can I fix this?


Source: (StackOverflow)

ip command in Mac OS X terminal

I use the command ip link in Linux. Now I want it on Mac OS X, but the Mac OS X terminal doesn't have ip. What should I use instead?


Source: (StackOverflow)

Mac OS X - Could not start Terminal.app - shell has illegal value

I can not run the Terminal.app after rolling back my system from time machine.

Mac OS X Version 10.6.2

It displays the following error. "Your are not authorized to run this application" "The administrator has set your shell to an illegal value"

After that I have deleted the file ~/Library/Preferences/com.apple.Terminal.plist

But the same message is displayed.

I have repaired all system rights with the DiskUtility but that did not help.


Source: (StackOverflow)

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 the full path and it is like this:

blabas-MacBook-Pro:classical beethoven$

Is there anyway that I change mac terminal behavior to act like linux terminal?


Source: (StackOverflow)

What does Terminal app's "Show Alternate Screen" do? (OS X)

Today, I discovered a menu item called "Show Alternate Screen" in Terminal.app. I am just curious about what it does. It seems to be sharing the same shell process (unlike tabs), since I see output from one screen on the other while a command is running (e.g. find .) and the current directory is kept in sync.

What is this feature and how is it useful?


Source: (StackOverflow)