下面是我这周目前的总结, 因工作繁忙, 内容比较简单, 希望大家见谅。
ctrl+a:跳到本行的行首
ctrl+e:跳到页尾
Ctrl+u:删除当前光标前面的文字 (还有剪切功能)
ctrl+k:删除当前光标后面的文字(还有剪切功能)
Ctrl+L:进行清屏操作
Ctrl+y:粘贴Ctrl+u或ctrl+k剪切的内容
Ctrl+w:删除光标前面的单词的字符
返回头部和内容
curl -i http://www.baidu.co
只返回头部
curl -I http://www.baidu.com
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
Connection: Keep-Alive
Content-Length: 277
Content-Type: text/html
Date: Wed, 13 Mar 2019 08:42:40 GMT
Etag: "575e1f60-115"
Last-Modified: Mon, 13 Jun 2016 02:50:08 GMT
Pragma: no-cache
Server: bfe/1.0.8.18
curl -X PUT 127.0.0.1:9200/synctest/article/5/
_create?pretty -d '{"name":"test"}'
{
"_index" : "synctest",
"_type" : "article",
"_id" : "5",
"_version" : 1,
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
},
"created" : true
}
curl 127.0.0.1:9200/synctest/article/5?pretty
{
"_index" : "synctest",
"_type" : "article",
"_id" : "5",
"_version" : 1,
"found" : true,
"_source" : {
"name" : "test"
}
}
curl -X POST 127.0.0.1:9200/synctest/article/5/_update?pretty -d '
{"doc":{"idx":"cc"}}'
{
"_index" : "synctest",
"_type" : "article",
"_id" : "5",
"_version" : 2,
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
}
}
curl -X DELETE 127.0.0.1:9200/synctest/article/5
{
"found":true,
"_index":"synctest",
"_type":"article",
"_id":"5",
"_version":2,
"_shards":{
"total":2,
"successful":1,
"failed":0
}
}
curl -i -X HEAD 127.0.0.1:9200/synctest/article/5?pretty
HTTP/1.1 200 OK
Content-Type: text/plain; charset=UTF-8
Content-Length: 0
查询不存在的数据
curl -I -X HEAD 127.0.0.1:9200/synctest/article/66?pretty
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=UTF-8
Content-Length: 0
查询id=3或4
curl -X POST 127.0.0.1:9200/synctest/article/_mget?pretty -d '{"id
s":["3","4"]}'
{
"docs" : [ {
"_index" : "synctest",
"_type" : "article",
"_id" : "3",
"_version" : 2,
"found" : true,
"_source" : {
"id" : 3,
"is_deleted" : 0,
"name" : "5333",
"update_time" : "2018-11-02T11:13:33+08:00"
}
}, {
"_index" : "synctest",
"_type" : "article",
"_id" : "4",
"_version" : 14,
"found" : true,
"_source" : {
"id" : 4,
"cc" : 1,
"views" : 6
}
} ]
}
ids 表示 id 的数组
接下来会寻找机会摸鱼, 整理更多的东西分享出来