每天学习点常用的知识
grep
[test@bj-uen-uat-51-160 20230717]$ grep -ir '用于测试使用' ./
./console-20230717_0.log:2023-07-17 20:44:16,439 [http-nio-8086-exec-118:5b2e6958796b0079] INFO [c.u.c.c.s.l.ThreadLocalLogHandler] - {"meta":{"clientType":"0","statusCode":200,"clientName":"h5","clientVersion":"v1.1","transDate":"20230717204416","username":"empwangpeng1"},"page":{"page":0,"size":10,"totalPages":1,"totalElements":1,"pageSize":10,"pageNumber":0},"result":[{"id":1,"orgNo":"HP00067707","orgName":"uat测试67707","appKey":"wBpzF9Le","opinion":"用于测试使用","dealStatus":"1","userName":"18336312037","createTime":"2023-07-17 20:44:11"}]}
./console-20230717_0.log:2023-07-17 20:44:20,669 [http-nio-8086-exec-115:e3ab9a69e19154a8] INFO [c.u.c.c.s.l.ThreadLocalLogHandler] - {"meta":{"clientType":"0","statusCode":200,"clientName":"h5","clientVersion":"v1.1","transDate":"20230717204420","username":"empwangpeng1"},"result":{"id":1,"orgNo":"HP00067707","orgName":"uat测试67707","appKey":"wBpzF9Le","opinion":"用于测试使用","dealStatus":"1","userName":"18336312037","createTime":"2023-07-17 20:44:11","picPaths":["group1/M00/01/95/CgozdWS1N4OAem6NAAEOGVk8Kzs938.jpg","group1/M00/01/95/CgozdWS1N4mADWKOAAE5qFIxDnI516.jpg","group1/M00/01/95/CgozdWS1N46AUT7FAADyOJxJYiA280.jpg"]}}
./console-20230717_0.log:2023-07-17 20:44:36,516 [http-nio-8086-exec-113:12513308236e7762] INFO [c.u.c.c.s.l.ThreadLocalLogHandler] - {"meta":{"clientType":"0","statusCode":200,"clientName":"h5","clientVersion":"v1.1","transDate":"20230717204436","username":"empwangpeng1"},"page":{"page":0,"size":10,"totalPages":1,"totalElements":1,"pageSize":10,"pageNumber":0},"result":[{"id":1,"orgNo":"HP00067707","orgName":"uat测试67707","appKey":"wBpzF9Le","opinion":"用于测试使用","dealStatus":"3","userName":"18336312037","createTime":"2023-07-17 20:44:36"}]}
./console-20230717_0.log:2023-07-17 20:44:40,368 [http-nio-8086-exec-116:362465f21d72ceb2] INFO [c.u.c.c.s.l.ThreadLocalLogHandler] - {"meta":{"clientType":"0","statusCode":200,"clientName":"h5","clientVersion":"v1.1","transDate":"20230717204440","username":"empwangpeng1"},"page":{"page":0,"size":10,"totalPages":1,"totalElements":1,"pageSize":10,"pageNumber":0},"result":[{"id":1,"orgNo":"HP00067707","orgName":"uat测试67707","appKey":"wBpzF9Le","opinion":"用于测试使用","dealStatus":"2","userName":"18336312037","createTime":"2023-07-17 20:44:40"}]}
[test@bj-uen-uat-51-160 20230717]$
vim
在底线模式下
- 显示行号
:set nu
- 取消行号显示
:set nonu
- copy行数据
10,15 copy 20
表示把10到15行的内容copy到第20行 - 撤销
u
- 复制行
3yy
粘贴p
复制3行数据,按p到光标定位的位置
在命令模式
- 光标定位到当前行字符的行尾
Shfit + $
- 光标定位到当前行字符的行首
0
- 光标定位到文档的末行
Shfit + G
- 光标定位到文档的首行
gg
- 光标定位到第5行
5G
- 光标定位当前行的下一个单词
Ctrl + →
- 光标定位当前行的上一个单词
Ctrl + ←