歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> SHELL編程 >> linux shell 常用配置

linux shell 常用配置

日期:2017/3/3 11:34:48   编辑:SHELL編程

~/.bashrc

[code]#ls相關
alias ls='ls -G --color=auto'
alias ll='ls -alhT'
alias l='ls'

#grep
alias grep='grep --color=auto'

#自定義函數
#jgrep匹配當前目錄下的所有java文件
#eg. jgrep History -rin
function jgrep()
{
    find . -iname  "*\.java" -print0 | xargs -0 grep --color -n "$@"
}

function xmlgrep()
{
    find . -iname  "*\.xml" -print0 | xargs -0 grep --color -n "$@"
}
~/.vimrc

[code]#顯示行數
set nu
#語法高亮
syntax enable
#設置背景
set background=dark
#設置搜索忽略大小寫
set ignorecase
.gitconfig

[code][user]
        name = xxxx
        email = [email protected]

[alias]
        st = status
        br = branch
[color]
        ui = auto

Copyright © Linux教程網 All Rights Reserved