• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how do i figure out this one..

 
johny walker
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i show the last 4 users which entered the system(not last 4 logins)
i tried this
last -4|cut -d" " -f1| uniq -u

but its not working

i was told to
"Do the last command ... send (all) the output to cut and get just the user, send THAT output on to uniq (to get unique values) then send that on to head to get the top 4 entries."

can some one help me to interpret these words to command?? :

about the first part ,do i need only wright "last"
about the second part ,what option to use in the uniq command

and the last one
how do i send that on to head to get the top 4 entries??

i dont know if this is the right way.
i dont care what command will lead to the result


i just want the list of the last 4 users which logged in??

i tried lots of combination that didnt work
please help
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The way I interpret that is:



but I think you will really want:

 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"google googler",
Please check your private messages.
 
johny walker
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks alott
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"google googler", please be sure to check Ben's private message and act accordingly.
 
johny walker
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
the command worked.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic