
bashrc
diy534
这个作者很懒,什么都没留下…
展开
-
~/.bashrc常用设置
export title="diy534"export ip=`/sbin/ifconfig | grep "inet addr" | head -1 | awk '/inet addr/ {print $2}' | cut -f2 -d ":"`#export PS1='\e]2; \[$title -\] \[$ip -\] \u\w\a[\u \W]\$'export PS1=原创 2011-11-30 15:26:46 · 2503 阅读 · 0 评论 -
bashrc alias
alias ifconfig='/sbin/ifconfig'alias h='history'alias sl='ls'alias ls='ls --color=auto -NF'alias virc='vi ~/.vimrc'alias barc='vi ~/.bashrc'alias lb='source ~/.bashrc'alias ll='ls -hl'原创 2012-02-09 13:24:15 · 1346 阅读 · 0 评论 -
bashrc get ip and deth
export ip=`/sbin/ifconfig eth0 | grep "inet addr" | head -1 | awk '/inet addr/ {print $4}' | cut -f2 -d ":"`export ip4=`echo $ip | awk -F. '{print $4}'`export ddethtmp=`pwd | awk -F/ '{print NF}'`原创 2012-02-09 13:18:17 · 459 阅读 · 0 评论 -
bashrc source global definitions
# Source global definitionsif [ -f /etc/bashrc ]; then . /etc/bashrcfi原创 2012-02-09 13:20:07 · 1806 阅读 · 0 评论 -
bashrc check if root
# Find out if we are rootif [ $UID -eq 0 ] ; then # The # character serves as an extra reminder that I am root SYM='#'else SYM='>'fi原创 2012-02-09 13:17:29 · 536 阅读 · 0 评论 -
bashrc history 添加时间
HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "export HISTTIMEFORMAT原创 2012-02-09 13:15:27 · 544 阅读 · 0 评论 -
history命令中添加时间
默认的bash设置中,在使用history命令查看历史命令的时候,不显示命令执行的时间,通过增加HISTTIMEFORMAT变量可以时间记录历史命令的功能。设置方法:在/etc/profile 或者 /etc/bashrc 里面加入下面2行就可以了,这样可以记录每个用户执行的命令了。HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "export HISTTIME原创 2012-02-08 20:38:18 · 1378 阅读 · 0 评论 -
bashrc ls color
LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=0原创 2012-02-09 13:22:10 · 865 阅读 · 0 评论 -
bashrc set PS1
if [ "$TERM" = "linux" ]then #we're on the system console or maybe telnetting in export PS1="\[\e[32;1m\]\u@\H > \[\e[0m\]"else #we're not on the console, assume an xter原创 2012-02-09 13:19:10 · 5622 阅读 · 0 评论 -
bashrc 常用颜色
# Define ANSI color sequencesNORMAL="\[\e[0m\]"BLUE="\[\e[0;34m\]"WHITE="\[\e[0;37m\]"MAGENTA="\[\e[0;35m\]"GREEN="\[\e[0;32m\]"BRIGHTBLUE="\[\e[1;34m\]"BRIGHTWHITE="\[\e[1;37m\]"BRIGH原创 2012-02-09 13:16:38 · 1366 阅读 · 0 评论 -
常用alias
alias ls='ls --color=auto -NF'alias virc='vi ~/.vimrc'alias barc='vi ~/.bashrc'alias lb='source ~/.bashrc'alias min='minicom'alias ll='ll -h'alias mc='make clean'alias m='make'alias gr原创 2011-12-06 09:29:37 · 777 阅读 · 0 评论 -
mybashrc
export ip=`/sbin/ifconfig | grep "inet addr" | head -1 | awk '/inet addr/ {print $2}' | cut -f2 -d ":"`NORMAL="\[\e[0m\]"BLUE="\[\e[0;34m\]"WHITE="\[\e[0;37m\]"MAGENTA="\[\e[0;35m\]"GREEN=原创 2011-12-06 09:11:30 · 530 阅读 · 0 评论 -
.bash_profile和.bashrc的什么区别 及 bashrc的详解
/etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置./etc/bashrc: 为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取.~/.bash_profile: 每个用户都可使用该文件输入专用于自己使用的shell信息,当用户转载 2011-12-06 00:54:21 · 1072 阅读 · 0 评论 -
bashrc
NORMAL="\[\e[0m\]"BLUE="\[\e[0;34m\]"WHITE="\[\e[0;37m\]"MAGENTA="\[\e[0;35m\]"GREEN="\[\e[0;32m\]"BRIGHTBLUE="\[\e[1;34m\]"BRIGHTWHITE="\[\e[1;37m\]"BRIGHTMAGENTA="\[\e[1;35m\]"原创 2011-12-05 21:05:40 · 579 阅读 · 0 评论 -
更改终端提示颜色.bashrc
http://s00909.blog.163.com/blog/static/37629199200971635551257/ http://hi.baidu.com/leejun_2005/blog/item/58fbae1700177c41f2de3284.html http://www.vixual.net/blog/archives/184 http://www.t转载 2011-12-05 20:04:26 · 2826 阅读 · 0 评论 -
Replace every cd with cd+ls
vi ~/.bashrc#Replace every cd with cd+lsif [[ $- == *i* ]]; then #if running interactively cd() { builtin cd "$@" && lb && ls }fi原创 2012-02-09 13:21:38 · 565 阅读 · 0 评论