CartMetrix - Do you know yours?

« Manually Run Urchin Reports | Home | Use SSH Tunnel to Circumvent ISP Blocking Port 25 »

9/14/2005

iTerm Tricks

Marc Liyanage posted a script to open a new Terminal window in a specified directory or run a specified command.

What it does is open up a new Terminal window and execute the arguments as command in that new window. When no arguments are given, it opens the new window in the current directory, which means it acts like a “clone” operation for the frontmost window. This is useful if you’re in some deeply nested directory and you need a second window right there. This way you don’t have to copy/paste or type the directory path.

I modified the script slightly to interface with iTerm, opening a new default session instead of a new window.

Download the file, place somewhere in your path, and make sure its executable.

Examples:
Open a second iTerm session in the current directory.

term

Open a second iTerm session in my home directory.

term ~

Open a second iTerm session and start editing my .bashrc file.

term vi ~/.bashrc

Open a second iTerm session in the current directory and start editing filename.

term vi filename

Open a second iTerm session in the current directory (presumably /var/log/httpd) and start following the error_log file using tail.

term tail -f error_log

Popularity: 64%

Trackback:

Related Posts

One Response to “iTerm Tricks”

  1. damonparker.org said:

    iTerm Here Applescript Update

    Last week I posted a combination shell script, Applescript to open a new iTerm session in the local directory or a specified directory.
    Version 1.2 is available for download now.
    The Applescript was fixed so the new session alwasy opens in the cur…

Post your opinion

Verification Image

Please type the letters you see in the picture.

Subscribe without commenting


damonparker.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

copyright © 2002-2008 damonparker.org. all rights reserved.

Close
E-mail It