Tag Archives: shell

cp a symlink to multiple directories

Today I wanted to copy a symlink to many different directories. So I tried the following: for f in `find . -regex ''.*cp.*snippets''` ; do cp bbb.html $f/ ; done Which returned: cp: cannot stat `bbb.html': No such file or directory bbb.html is a symlink and the default behavior of cp (I think) is to [...]
Posted in tips | Tagged | Leave a comment

Mac OS X color showing ESC[whatever for git-diff colors (and more)

Since my upgrade to OS X 10.5 I have been having a terrible time getting colors to work with git. Originally I was using OS X 10.5.4, git version, and iTerm or Terminal.app. $TERM=xterm or xterm-color. I have color with PS1, ls, vim and most git tasks. However, git diff (or git show) always [...]
Posted in tips | Also tagged , | 26 Comments