cat结合grep搜索关键字
[root@hadoop-master test]# cat -n file1.txt |grep "1"
1 第1行
10 第10行
find搜索文件内容
下面是搜索当前文件夹下以.txt结尾,并且内容包含“5”的内容
[root@hadoop-master test]# find ./*.txt -type f | xargs grep "5"
./file1.txt:第5行
./file2.txt:第5行
scp上传下载
上传
上传单个文件到服务器
[root@hadoop-master test]# scp ./uploadScpTest.txt root@hadoop-slave1:/usr/local/test
uploadScpTest.txt
上传目录到服务器
[root@hadoop-master test]# scp -r ./ root@hadoop-slave1:/usr/local/test
uploadScpTest.txt
下载
从服务器把文件下载到本地目录
[root@hadoop-master test]# scp root@hadoop-slave1:/usr/local/test/scptest.txt ./
scptest.txt
把整个目录下载到本地
[root@hadoop-master test]# scp -r root@hadoop-slave1:/usr/local/test ./
file1.txt
curl发送POST请求
curl -H "Content-Type: application/json" -X POST -d '{"user_id": "123", "coin":100, "success":1, "msg":"OK!" }' "http://192.168.0.1:8001/test"
常用快捷键和命令
xshell的rz和sz
rz上传文件
rz:received(接收),服务器接收文件,也就是本地上传到服务器。
sz下载文件
sz:send(发送),服务器发送文件,也就是本地从服务器下载文件。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/72669.html