my .bashrc

简介: my .bashrc
# gvim
alias  g='gvim'
alias  go='gvim -o'
alias  gO='gvim -O'
alias  gp='gvim -p'
alias  gbash='gvim ~/.bashrc'
gm() {
 gvim -p *$1*
}
# dir
cdls() {
  \cd $1
  ls
}
cdm() {
  cd *$1*
}
llm() {
  ll -d *$1*
}
alias  cd='cdls'
alias  .='cd ..'
alias  ..='cd ../..'
alias  ...='cd ../../..'
alias  ....='cd ../../../..'
alias  cc='clear clear clear'
alias  du1='du -h --max-depth=1'
alias  llt='ll -tr'
alias  grep='grep -r -n --exclude-dir='.svn' --color=auto'
# set terminal title
stt() {
  if [[-z "$ORIG"]]; then
    ORIG=$PS1
  fi
  TITLE="\[\e]2;$*\a]"
  PS1=${ORIG}${TITLE}
}
# batch replacement file name, usage: cmd name1 name2
exchange_file_name() {
  find $1* | xargs -i echo mv \"{}\" \"{}\" | sed s/$1/$2/2g | sh
}
# repleacement string of all files in this dir
exchange_string() {
  sed -i s/$1/$2/g *
}
# find latest folder
find_latest_folder() {
  folder_name_s=''
    for i in `ls -tr`
    do
      folder_name_s=$i
    done;
    echo 'open latest folder: '$folder_name_s
}
# svn
alias  sl='svn_log5'
alias  sll='svn_log10'
alias  svndk='svndk'
svn_log5() {
  svn log -l 5 $1
}
svn_log10() {
  svn log -l 10 $1
}
svn_delete_keep() {
  svn delete --keep-local $1
}
目录
相关文章
|
4月前
|
Shell Linux
bashrc和profile区别
bashrc和profile区别
30 1
|
4月前
|
搜索推荐 关系型数据库 MySQL
/etc/profile,/etc/bashrc,~/.profile,~/.bashrc 的区别及使用
/etc/profile,/etc/bashrc,~/.profile,~/.bashrc 的区别及使用
29 0
|
Shell 数据安全/隐私保护
profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2
profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2
86 0
|
Shell Linux Go
Linux profile1,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part1
Linux profile1,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part1
103 0
|
Shell Linux
/etc/profile和~/.bash_profile的区别与联系
/etc/profile 为系统的每个用户设置环境信息和启动程序,当用户第一次登录时,该文件被执行,其配置对所有登录的用户都有效。当被修改时,必须重启才会生效。
3480 0
|
JavaScript Python