Accessing the console via the terminal?

Discussion in 'Mac Programming' started by sebf, Sep 23, 2007.

  1. sebf macrumors member

    Joined:
    Oct 25, 2006
    Location:
    UK
    #1
    Just wondering if its possible to access the console via the terminal?

    As it would be useful to view HTTP and PHP error messages when I am remotely connected to it via SSH.

    Thanks for any tips!
     
  2. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #2
    The console log? If that's what you mean, it's in /Library/Logs/Console/yourguid. Usually, guid = 501, but you'll figure it out. So you can more, grep, cat it to your heart's desire.
     
  3. Sayer macrumors 6502a

    Sayer

    Joined:
    Jan 4, 2002
    Location:
    Austin, TX
    #3
    You can use 'tail' to see the last bits of a log file. You said HTTP/PHP so you would use:

    Code:
    tail /var/log/httpd/access.log
    or

    Code:
    tail /var/log/httpd/error.log
    This is basically all that the Console.app does. Your log file names may be different, so you can always
    Code:
    cd
    to
    Code:
    /var/log/httpd
    and do an ls and see what log you want to peek in is called.
     

Share This Page