safest command-line (not GUI) program to view apache logs?
The Apache 2.2 docs say
Quote:
|
yes
|
'tail -f' seems to be better.
|
tail -f will only show you the last 10 lines and all new lines coming in. But what if the information you are looking for is above the 10 lines?
(And don't be a smarass and answer with tail -n 20 -f :D) |
UNsafe:
Code:
php -r "include('/var/log/httpd/access.log');" Code:
tail -n 500 | less |
Quote:
I use tail as such: tail -f -n 100 /var/log/httpd/access_log Quote:
Quote:
Quote:
|
thanks + a couple questions
thanks for the help, everyone.
Quote:
i was actually worried more about someone using shell control characters to trick the shell itself into executing another (arbitrary) command. but now that i think about it, unredirected output from programs the shell executes are just sent to the shell's own stdout/stderr, and have no chance to influence the shell's commands (stdin). isn't that right? |
All times are GMT -5. The time now is 10:12 AM. |