function edicat () { perl -p -e 's/(?<!\?)\x27/\n/g' $* } function ediless { edicat $* | less } # Variations on a Theme called ls: alias ls='ls -hF --color=tty' alias l='ls -l' alias ll='ls -lA' alias la='ll' function lm () { ls -l $* | less ; } function llm () { ls -lA $* | less ; } alias ltr='ls -ltr' alias lt='ls -lt' # only dirs alias lsd='for i in *; do if [ -d "$i" ]; then ls -d $i; fi; done' alias llsd='for i in *; do if [ -d "$i" ]; then ls -dl $i; fi; done' # view/edit/search files alias m='less' alias mm='less' alias mo='more' alias t='tail' alias tf='tail -f' function xem () { xemacs $* & } alias em='emacs -nw' # Grepped if [ `grep --version | head -n 1|cut -d' ' -f4 | sed 's/\.//g'` -ge 251 ]; then alias grep='grep --color' fi function g () { grep $* 2> /dev/null ; } alias gi='g -i' alias gir='g -ir' alias gr='g -r' alias grv='g -v' function gm () { grep $* 2> /dev/null | $PAGER ; } alias gim='gm -i' # find function fx () { for i in `locate $1`; do if [ -x $i ]; then echo $i; fi; done } function mkddir () { if [ -z $1 ]; then mkdir $(date +%F) cd $(date +%F) else mkdir $(date +%F)_$1 cd $(date +%F)_$1 fi } function ff () { if [ -z $2 ]; then # echo CALLING find . ${1:+ \-name "*$1*"} -print find . ${1:+ \-name "*$1*"} -print else # echo CALLING find ${1:+ "$1"} ${2:+ \-name "*$2*"} -print find ${1:+ "$1"} ${2:+ \-name "*$2*"} -print fi } alias lo='locate' alias loi='locate -i' # interactive alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' alias mvv='mv -v' # directories alias ..='cd ..' alias ...='cd ../../' alias md='mkdir' function mdd () { mkdir -p $1 ; cd $1 ; } function ccd () { builtin cd $1 ; pushd `pwd` ; } # diverse #alias ssh='ssh -X' alias bc='bc -l' alias mc='mc -x' alias lc='wc -l' #alias hiddentop='wterm -T hidden +sb -tr -fg "#cecece" -bg "#334577" -e top&' alias hiddentop='rxvt -T hidden +sb -tr -fg \"#9e9e9e\" -bg \"#336577\" -fn 6x10 -geometry +796+0 -e top&' alias sm='/usr/sbin/sendmail -v -q' alias ty='type' alias dush='du -sh' function cmucl () { rlwrap lisp $@ } function epoch { perl -MPOSIX -e "print(strftime(\"%F %T\",localtime($1)),\"\n\")" } # The Alphabet alias a='apropos' alias b='bc' alias c='cat' alias d='display' alias e='export' alias f='file' #alias g='grep' alias h='head' alias i='info' alias j='jmacs' alias k='konqueror `pwd`&' #alias l='ls -l' #alias m='less' alias n='netstat' alias o='more' alias p='phon' #alias q='' #alias r='' #alias s='' #alias t='' #alias u='' #alias v='' #alias w='' #alias x='' #alias y='' alias z='zgrep'