How to clear "last" command in terminal?

Discussion in 'Mac Apps and Mac App Store' started by domenator, Nov 8, 2009.

  1. domenator macrumors newbie

    Joined:
    Apr 10, 2008
    #1
    I've searched Google and been unable to find an answer to this. I use terminal heavily and when I use the command "last" I get hundreds of my logins over the course of the past 3 years. This is really obnoxious to scroll through when I'm looking for when my kids logged in a day ago. Does anyone know a command to reset this so the next time i enter "last" I will have a nice fresh blank log? Appreciate any help.
     
  2. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #2
  3. domenator thread starter macrumors newbie

    Joined:
    Apr 10, 2008
    #3
    hmm that's interesting. i am running leopard currently. thinking about snow leopard but i have some classic apps that I need to run so I'm gonna wait. appreciate the help.
     
  4. psxguru macrumors 6502a

    Joined:
    May 19, 2006
    #4
    You do know you can limit the number of entries returned? eg

    last -5

    this will give the last 5 logins.

    You can also add a username eg

    last -5 domenator

    this will show the last 5 logins for the user domenator.

    'man last' for more info ;)
     
  5. domenator thread starter macrumors newbie

    Joined:
    Apr 10, 2008
    #5
    ty ty. I was using the man pages form OnyX for last, and for some reason last wasn't coming up there. Idk why I didn't think to just use man pages from terminal. Silly me.
     

Share This Page