Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sebf

macrumors member
Original poster
Oct 25, 2006
48
0
UK
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

Moderator emeritus
Jan 9, 2004
29,776
15
Grand Rapids, MI, USA
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

macrumors 6502a
Jan 4, 2002
981
0
Austin, TX
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.