0

I need to see how many times users logged in.

I used last | sort | uniq -c but it gave me bad data

I need to sort them by number of times they logged in and only show username and number of time.

for example:

username       number of logins
userb          36
usera          12
userd          12
userc          8
Nmath
  • 12,664
Usermaxn
  • 247
  • 2
  • 10

1 Answers1

0

thanks to @user68186

the answer is last | cut -c 1-8 | sort | uniq -c | sort -n -r

Usermaxn
  • 247
  • 2
  • 10