Article Directory
cat and grep search keywords
[root@hadoop-master test]# cat -n file1.txt |grep "1"
1 第1行
10 第10行
find search file content
The following is to search the current folder ending with .txt, and the content contains "5"
[root@hadoop-master test]# find ./*.txt -type f | xargs grep "5"
./file1.txt:第5行
./file2.txt:第5行
scp upload and download
Upload
Upload a single file to the server
[root@hadoop-master test]# scp ./uploadScpTest.txt root@hadoop-slave1:/usr/local/test
uploadScpTest.txt
Upload directory to server
[root@hadoop-master test]# scp -r ./ root@hadoop-slave1:/usr/local/test
uploadScpTest.txt
Download Download
files from the server to a local directory
[root@hadoop-master test]# scp root@hadoop-slave1:/usr/local/test/scptest.txt ./
scptest.txt
Download the entire directory to the local
[root@hadoop-master test]# scp -r root@hadoop-slave1:/usr/local/test ./
file1.txt
curl sends a POST request
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"
Commonly used shortcut keys and commands
rz and sz of xshell
rz upload file
rz: received (received) , the server receives the file, that is, upload it locally to the server.
sz download file
sz: send (send) , the server sends the file, that is, download the file locally from the server.