<> Common commands for viewing log files
tail -f fileName # Real time viewing tail -f fileName|grep "save" # filter -- Show only matching rows tail -f
fileName|grep -v "save" # filter -- Show unmatched rows cat fileName # see file cat fileName|grep
"save" # filter -- Show only matching rows cat fileName|grep "save"|wc -l # Count matched rows cat fileName|grep -o
"cardSource\.*" # Show fields that match the regular cat fileName|grep -A 10 "save" # filter -- After displaying matching rows 10 That's ok cat
fileName|grep -B 10 "save" # filter -- Show matching lines before 10 That's ok cat fileName|grep -C 10 "save"
# filter -- Show matching lines before and after 10 That's ok cat -n fileName # Displays the number of rows sed -n '5,10p' fileName # Display page No 5 Line to 10 That's ok more
fileName # Split screen display more +10 fileName # From 10 Line start split screen display less fileName
# After opening the file, press G Tune to the end , Press f Page forward , Press b Page backward . Enter the line number to jump to the specified line starting from the current page . less -N fileName # set number

Technology