ASIC/FPGA Design and Verification Out Source Services
Some tips for setting up the files: .cshrc and .bashrc
This is a short description in which I explain some of my aliases and settings for bash and tcsh. As part of my work I move from one place to a another one often. In some computers I have bash usually under cygwin and in some tcsh. To make it easier for me to re-configure, I put my basic aliases in my site. Other people may benefit as well.
For the tcsh please note that I have nice prompt with pwd location. Also made my tab completion behave as the default bash. Another nice thing to have is the hg, which stands for history gerp. It allows to filter, from the history command file, the desired commands.
alias term_name 'echo -n "\033]0;\!:1\007"' #csh xterm title name setting
alias dus 'du -s .'
alias dun 'du | sort -n'
alias pu pushd
alias po popd
alias h history
alias lsc 'ls --color=auto -lat --color=tty --classif'
alias ll 'ls --color=auto -lrta'
alias lld 'ls --color=auto -latr | grep ^d'
alias lls 'ls -la | sort -n --key=5'
#To print just the size and name one can pipe the output of ls to awk
#ls -lart | awk '{print $5,$9}'
alias my_date 'date +%y%m%d_%H%M%S'
alias hg 'h | grep \!:1'
set prompt="%m{%n} %/ >"
set autolist
For the bash I have similar functionality. Note that hg is implemented using bash function
#color greps' results
alias grep 'grep --color=auto'
alias ccencrypt="ccencrypt --timid "
alias dus="du -s ."
alias dun="du | sort -n"
alias pu=pushd
alias po=popd
alias h=history
alias lsToday="ls -al --time-style=+%D | grep `date +%D`"
alias lsc="ls --color=auto -lat --color=tty --classif"
alias ll="ls --color=auto -lrta"
alias lld="ls --color=auto -latr | grep ^d"
alias lls="ls -la | sort -n --key=5"
alias vi='gvim "+set guifont=Fixed\ 12"'
#xpdf to start with page width zoom
alias xpdf='xpdf -z width '
alias my_date="date +%y%m%d_%H%M%S"
alias my_ip="~/bin/my_ip.unx"
alias PrintScreen="ksnapshot";
alias cr=crontab
alias my_xterm="xterm -geometry 80x26+100+40 -fn *-fixed-*-*-*-20-* "
alias v2sc="/home/pini/Home_2/V2SC/v2sc-2007-04/bin/v2sc"
alias prg_rpt="./prg_rpt.unx"
function hg () { history | grep $1; }
Note that under bash one can also use control R to bring commands from history.
To go to my most used directories, I use a double cd command in an alias.
Why double command? Because it allows me to cd - and switch between two directories,
where the first one is only during work start:
alias my_dir 'cd /home/krengelp/Junk/WRK/UART_213; pwd; cd /proj/digi120_il/devel/krengelp; echo "------"; pwd; ls'
#for security check who was last logged in the system:
#Security
alias users_last='last | grep -v "^pini" | gvim -'
Some aliases useful for screen command:
screen aliases
Explain an alias, which I use to measure CPU
load
Contact me now at: |