tcsh tidbits

Aliases
Here are some aliases that I find useful, nothing quite fancy. Any alias involving rm comes with a standard "handle with care" tag.

Cleaning up directories:
alias purge '\rm *~ *~*~ #*# .*~*~ *.BAK .*.BAK .*% *% *.bak'

Unshare and Edit: My standard approach for hacking files that are golden is to save a master copy and then create links to it. Once I need to hack further, I use unshedit.
alias unshedit '\cp \!* x.temp;\mv x.temp \!*;chmod +w \!*;gvim \!*'

To open a man page in a new window:
alias man 'xterm -geometry 90x70 -T \!* -ah -n \!* -bg gray40 -fg orange -e /usr/bin/man \!* &'

Don't know an easier way thus:
alias ipconfig "grep `hostname` /etc/hosts |awk '{print $1}'"


File testing conditions:
-e file true if file exists
-o file true if file exists and is owned by the user
-r file true if file exists and is readable
-w file true if file exists and is writable
-x file true if file exists and is executable
-z file true if file exists and is zero size
-d dir true if dir exists and is a directory



mishrav's shared items