Collapse repeated adjacent lines.
Section: Viewing and Text Basics
Filter duplicate adjacent lines
bash
bash
sort access.log | uniq -c | sort -nrExplanation
Remember to sort first if you want global duplicate counts.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Viewing and Text Basics