Linux command – Cheatsheet
Line number
wc -l < ./06-07-20.csv
Sort slow query log
sort --stable --reverse --key=1,2 slowQuery_6_7.csv > slowQuery_6_7_sorted.csv
Find lines start with specific characters
grep "^2023-05-16" ./slowQuery.csv > 5_16.csv
Exclude characters
grep -v "apiservice" ./06-07-20.csv | grep -v "mother" | grep -v ",web" | grep -v "catalogservice" > ./06-07-20-others.csv