linux配置文件_.bashrc

#by skange

#带保险的rm
alias rm='trash'
alias rl='trashlist'
alias ur='undelfile'
trash()
{ 
    mv $@ ~/.trash/ 
} 
#显示回收站中垃圾清单 
trashlist() 
{ 
    ls -alt ~/.trash 
} 
#找回回收站相应文件 
undelfile() 
{ 
    mv -i ~/.trash/$@ ./ 
} 
#清空回收站 
cleartrash() 
{ 
    echo -ne "Clear all files in ~/.trash, Sure?[y/n]" 
    read confirm 
    if [ $confirm == 'y' -o $confirm == 'Y'  ] ;then 
        /bin/rm -rf ~/.trash/* 
        /bin/rm -rf ~/.trash/.* 2>/dev/null 
    fi 
}

#现在最常用的文件夹
export J="/home/skange/code/haizeicourse/structure/"

#复制覆盖询问
alias cp='cp -i'

#移动覆盖询问
alias mv='mv -i'

#中英文man手册
alias eman='man -M /usr/share/man/'
alias man='man -M /usr/share/man/zh_CN/ '

#删除可执行文件
alias clearallx='mv -i `ls  -F | grep \* | cut -d \* -f 1 | grep -v ".sh" `  ~/.trash'

#cd默认路径
export CDPATH=.:~:~/code:~/code/haizeicourse/

#sh文件加可执行权限
alias vimsh='touchsh'
touchsh() 
{
    touch $1
    echo "#!/bim/bash" > $1 
    chmod u+x $1
    vim $1
}


#原生命令
alias nativerm='/bin/rm'
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值