Linux 使用技巧(持续更新)

来源:互联网 发布:西部数码域名备案流程 编辑:程序博客网 时间:2024/05/22 13:24

1、grep搜索命令,减少部分搜索路径以提高搜索速率

在根目录下.bashrc文件的最后面加上这么一句话

export GREP_OPTIONS="--exclude=*.log --exclude=cscope.* --exclude=tags --exclude=*~ --exclude=*.tmp --exclude-dir=*.git
 --exclude-dir=out --exclude-dir=*.repo --exclude-dir=*.so --exclude-dir=prebuilts" 
然后再实用grep的时候就不会把retag_app带出来的一些文件查出来了。另外我们也可以自行添加一些需要屏蔽的文件,或者是文件夹

--exclude=后面跟的是文件,--exclude-dir后面跟的是文件夹

2、使用git ignore 使git status时忽略一些文件状态

在代码模块下新建一个.gitignore文件,可以屏蔽git st .带来的一些不必要显示的文件,如下:
cscope.files
cscope.in.out
cscope.out
cscope.po.out
filenametags
tags
.gitignore
这样每次retag_app后就不会多出很多红色文件了

3、好用的android配套开发工具

total control

4、ctags时,多个重名使用命令

:tselect tagname

0 0
原创粉丝点击