Lazo Lab Sign up

Linux & the Command Line / Power tools

Lesson 19 of 30

sort, uniq, cut and awk

These tools slice and summarise text. Together they turn messy logs into quick reports.

Key points

  • cut -d: -f1 takes the first field
  • sort | uniq -c | sort -nr ranks things
  • awk '{print $1}' prints column one
cut -d: -f1 /etc/passwd | sort
Watch a video on thisOpens YouTube search results for “sort, uniq, cut and awk” in a new tab

Quiz · +10 XP

What does uniq -c do?

Log in to save progress and earn XP.