find log where string does not exist, with grep -iv
2023. 4. 25. 17:25ㆍDev
728x90
반응형
How can I find specific lines where string does not exist without case with grep commands.
grep -iv
Search a string without case sensitivity | grep -i "string" |
Select a line where no matching pattern exists | grep -v "string" |
Select lines where "string" does not exist, regardless of case | grep -iv "string" |
For example, How can I find which shard's state is not started in ElasticSearch with catAPI
curl -X GET "localhost:9200/_cat/shards?h=idx,sh,pr,st,docs,unassigned.reason" | grep -iv started
->
index shard prirep state docs unassigned.reason
access_log_1 1 p UNASSIGNED .. NODE_LEFT
access_log_2 2 p UNASSIGNED .. NODE_LEFT
'Dev' 카테고리의 다른 글
Karmada란? (0) | 2023.05.27 |
---|---|
컨피그레이션 드리프트란? Configuration Drift (0) | 2023.04.25 |
Kubernetes Dashboard Token Expired Issue (0) | 2023.03.21 |
Kubernetes Pod Warning: 1 node(s) had volume node affinity conflict (0) | 2023.02.22 |
2023년 AWS 시험 프로모션 코드 (0) | 2023.02.20 |