I am trying to find the reason of this command and as I know very basic I found that

```
last | cut -d" " -f 1 | sort | uniq -c | sort

```

`last` = Last searches back through the file /var/log/wtmp (or the file designated by the -f flag) and displays a list of all users logged in (and out) since that file was created. 

`cut` is to show the desired column.

The option `-d` specifies what is the field delimiter that is used in the input file.

`-f` specifies which field you want to extract

1 is the out put I think which I am not sure

and the it is sorting and then it is

`Uniq` command is helpful to remove or detect duplicate entries in a file. This tutorial explains few most frequently used uniq command line options that you might find helpful.

If anyone can explain this command and also explain why there is two sorts I will appreciate it.