The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Grepping Errors in a file achararun Shell Programming and Scripting 4 02-05-2007 03:36 AM
Convert minutes to hours, minutes, seconds Vozx Shell Programming and Scripting 1 12-09-2005 01:24 AM
Loop and grepping into a file skotapal Shell Programming and Scripting 3 08-26-2002 10:28 PM
grepping the first 3 characters from a file rachael UNIX for Dummies Questions & Answers 2 10-15-2001 03:33 PM
grepping the first 3 characters from a file g-e-n-o UNIX for Dummies Questions & Answers 2 10-15-2001 07:11 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-05-2008
jtelep jtelep is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 4
Grepping the last 30 minutes of a log file...

I need to know if anyone can assist me on how to grab the last (we'll just say "x" minutes) of a log file. How do you tell the grep command without specifying an exact window of time? (So relative instead of absolute.)

Thanks,

Jon
  #2 (permalink)  
Old 03-05-2008
matt.d's Avatar
matt.d matt.d is offline
Registered User
  
 

Join Date: Feb 2008
Location: /dev/null
Posts: 62
How is the timestamp specified in your logfile?
  #3 (permalink)  
Old 03-06-2008
jtelep jtelep is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 4
The actual entry looks just like this:

03-05-2008 23:24:32 blah blah blah

Thanks in advance.

J.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0