Readable, colourful Terminal in Snow Leopard

27/01/2010

Terminal screenshot

  1. Install SIMBL: http://www.culater.net/software/SIMBL/SIMBL.php
  2. Install the Snow-Leopard-friendly version of the TerminalColors plugin for SIMBL: http://github.com/timmfin/terminalcolours
  3. Install the IR_Black theme and set it as default in Terminal.app preferences: http://blog.infinitered.com/entries/show/6
  4. Turn on CLI color in your .bash_profile:
    export CLICOLOR=1;
  5. Bonus round: set yourself a colourful bash prompt: http://devblog.bluefuton.com/2008/05/coloured-bash-prompt-in-os-x/
No Comments

Find files created in the last x minutes

31/07/2009

To find files created in the last 30 minutes:

find -cmin +30
No Comments

Bash: replacing a string in files using sed

7/04/2009
sed -i 's/old-word/new-word/g' *.txt

More: http://www.cyberciti.biz/faq/unix-linux-replace-string-words-in-many-files/

No Comments

Bash: clean up temporary files with find and xargs

7/04/2009
find . -name ._* | xargs rm
No Comments

Bash: loop through directory of files and act on each

20/10/2008

In this example, we svn revert every file in the directory:

for each in `ls .`; do svn revert $each; done
No Comments

Coloured bash prompt in OS X

7/05/2008

Pop this into /etc/bashrc for a green and blue one…

export PS1="\[\e[32;1m\]\u@\h:\[\e[34;1m\]\w\[\e[0m\]$ "

More colour codes here: http://blog.infinitered.com/entries/show/6

No Comments