VIM切分窗口:Ctrl+w+v把vim分成了左右两个窗口,但光标一直停在左边那个窗口里, 或者vsplit 命令,vsplit filename
用Ctrl+w切换光标;
SecureCRT切换窗口:Ctrl+Tab
grep命令:
通用命令:$ grep match_pattern filename//match_pattern可视为通配符
eg:grep "bid_price" oce_log//打印含有bid_price的行
cat oce_log | gerp -c "price"//打印含有price的行数, 参数-c
参数-e , 正则表达式匹配; -c:输出行数;-v打印包含match_pattern的行之外的所有行
eg:echo -e "this is a word\nnext line" | gerp word//打印this is a word
echo -e "1 2 3 4\nhello\n5 6" | grep -e "[0-9]"//打印两行1 2 3 4\n5 6
echo -e "1 2 3 4\nhello\n5 6" | grep -c "[0-9]"//打印2
echo -e "1 2 3 4\nhello\n5 6" | grep -v "[0-9]"//打印hello
查找命令:
find ./ -name "Util.ice"
安装JDK
sudo apt-get install openjdk-7-jdk
putty设置字符编码:“Windows”——“Translation”配置字符编码为UTF8
tabenew 打开tab页面,esc g t切换
v进行块选择,y复制,p粘贴,d删除
# find <directory> -type f -name "*.c" | xargs grep "<strings>" <directory>是你要找的文件夹;如果是当前文件夹可以省略 -type f 说明,只找文件 -name "*.c" 表示只找C语言写的代码,从而避免去查binary;也可以不写,表示找所有文件 <strings>是你要找的某个字符串