Unique sorted values
Count occurrences of each unique line
sort file.txt | uniq -c | sort -rn
More linux commands
-
who -H && wActive user sessions and what they are running
-
last -n 20 | head -25Last 20 login records with IP and duration
-
journalctl -u ssh --since '24h ago' | grep 'Failed password' | awk '{print $(NF-3)}' | sort | uniq -c | sort -rn | head -10Top source IPs of failed SSH logins in last 24h
-
sudo -l -U <username>List sudo rules for a specific user
-
usermod -aG docker,sudo aliceAppend user to multiple groups without removing existing ones