Nice! I am stealing idea! Thanks!
Will share what i will be able to. On Fri, 31 Jul 2015 23:27 <[email protected]> wrote: > Hello everybody > > How do you customize your environment? > > What aliases or custom functions do you use? > > Here's my /etc/profile I think you can find one or two interesting things > in it. > > Show us yours! > > (in case wordwrapping breaks long lines: http://pastie.org/10322761) > > ############################################# > > hname=`hostname` > hname=${hname%%.*} > > # You are here > test ! -f ~/.hushlogin && test -t 0 && banner $hname > > # complete path > > PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/u/system/bin: > export PATH > > # system defaults > PAGER=less > export PAGER > EDITOR=vi > test -x "/usr/local/bin/vim" && EDITOR=vim > export EDITOR > > # confort > alias more=less > alias ls='ls -Fca' > alias l='ls -l' > alias wget='wget -c' > > alias _tf='tail -20 -f ' > alias tf='_tf /var/log/messages' > alias tfm='_tf /var/log/maillog' > alias tfd='_tf /var/log/daemon' > > alias ducks='du -cks * |sort -rn |head -11' > > alias pid='ps awwwwwx | grep -v grep | egrep -- ' > test -x "`which pgrep 2> /dev/null`" && alias pid='pgrep -lf ' > > pidof() > { > pgrep $1 > } > > pkey() > { > cat ~/.ssh/id_dsa.pub | \ > ssh $1 "(mkdir ~/.ssh > /dev/null 2>&1; cat - >> > ~/.ssh/authorized_keys)" > } > > # windozise > #alias rm='rm -i' > #alias mv='mv -i' > #alias cp='cp -i' > > # www > alias gohtdocs='cd /var/www/htdocs' > alias gosite='cd /var/www/htdocs/site/' > > alias httpd_restart='/etc/rc.d/httpd restart' > > # OpenBSD CVS > [email protected]:/cvs > export CVSROOT > > CVS_RSH=/usr/bin/ssh > export CVS_RSH > > # OpenBSD packages > export PKG_PATH="http://ftp.openbsd.org/pub/OpenBSD/`uname > <http://ftp.openbsd.org/pub/OpenBSD/uname> > -r`/packages/`uname -m`/" > export PKG_PATH > > # ui > if [ "${SHELL}" = "/bin/ksh" ] > then > PS1=$hname':$PWD{!}' > > if [ "$USER" == "root" ] > then > export PS1="$PS1# " > alias p='export PS1="# "' > else > export PS1="$PS1 " > alias p='export PS1="$ "' > fi > > set -o emacs # heh > set -o vi-tabcomplete # bashishhh > > bind ^B=backward-word > bind ^N=forward-word > fi > > unset hname > > # ui > if [ -t 0 ] > then > stty erase ^? > stty status ^T # for dd(1) > fi > > # > > alias fw_log='tcpdump -ttt -nle -i pflog0' > > alias openports='fstat | grep internet| grep -v 127.0.0 | sort -u | awk "{ > print \$9 }" | sort -u' > > xtitle() > { > printf "\\033]0;$1\\007" > } > > > alias unspam='sa-learn --ham --dbpath /var/amavisd/.spamassassin -u _vscan' > alias idspam='sudo -u _vscan /bin/sh -l' > > function spamtrap > { > test -z "$1" && echo 'usage: spamtrap <regex to block>' && return 1 > > spamdb | grep "$1" | cut -d\| -f 2 | while read x ; do spamdb -t > -a $x; > done > } > > export http_proxy="http://157.92.192.253:8080/" > export https_proxy=$http_proxy > export ftp_proxy=$http_proxy > > test -f /etc/profile.local && . /etc/profile.local

