[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Void's Forums • View topic - Grep?

Grep?

Discuss Programming

Grep?

Postby byrdman » Tue Aug 18, 2009 9:19 am

I have a secure log file that reads:

Aug 17 09:09:09 hostname sshd[pid] :Accepted public key for user from x.x.x.x port 49332 ssh2

I want to create a php page that just displays :

Aug 17 09:09 user ipaddress

if I dump the secure log into a db, it will get huge but I was hoping I could create a cron that 'cat' the secure log and the output would just have the date, user, and ipaddress.

Am I going down the right path by using grep in an advanced way
My ultimate goal is to have a web page that will display the connected users and their ip addresses

(kiosk project)
byrdman
administrator
administrator
 
Posts: 225
Joined: Thu May 08, 2003 1:59 pm
Location: In the cloud

Postby Void Main » Tue Aug 18, 2009 9:42 am

User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby byrdman » Mon Aug 31, 2009 1:51 pm

byrdman
administrator
administrator
 
Posts: 225
Joined: Thu May 08, 2003 1:59 pm
Location: In the cloud

Postby Void Main » Mon Aug 31, 2009 2:24 pm

User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby byrdman » Mon Aug 31, 2009 2:57 pm

byrdman
administrator
administrator
 
Posts: 225
Joined: Thu May 08, 2003 1:59 pm
Location: In the cloud

Postby Void Main » Mon Aug 31, 2009 7:51 pm

User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA


Return to Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron