View Full Version : Accessing the console via the terminal?
sebf
Sep 23, 2007, 11:20 AM
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!
mkrishnan
Sep 23, 2007, 11:34 AM
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.
Sayer
Sep 23, 2007, 11:50 AM
You can use 'tail' to see the last bits of a log file. You said HTTP/PHP so you would use:
tail /var/log/httpd/access.log
or
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 cd to /var/log/httpd and do an ls and see what log you want to peek in is called.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.