UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 3rd, 2012, 02:07 AM
sidharthmellam sidharthmellam is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 1 sidharthmellam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 14 sec
Reputation Power: 0
Grep options for a time stamp ?

Hello

How to grep on AIX , with required timestamp slot, that is


For example:

System went down , say at Dec 2 01.50

Now after coming to office in the Buisiness hours of 3 December

I want to view the Files and the text which has given the details , what has

happened on the system in at Dec 01.50

how to grep the file names with Time stamp and text

I tried with

#grep -i Dec 2 01.50 * | more

But I get output like

dev_id[Thr 1] Mon Dec 3 07:28:58 2012
dev_id[Thr 1] Mon Dec 3 07:28:59 2012
dev_id[Thr 772] Mon Dec 3 07:29:03 2012
dev_id[Thr 772] Mon Dec 3 07:29:14 2012
dev_idb00:started at : Sun Dec 2 22:19:57 2012
dev_idb00:[Thr 1] Sun Dec 2 22:19:57 2012
dev_idb00:[Thr 1] Sun Dec 2 22:19:58 2012
dev_idb00:[Thr 772] Sun Dec 2 22:19:59 2012
dev_idb00:[Thr 772] Sun Dec 2 22:20:02 2012
dev_idb00:[Thr 772] Sun Dec 2 22:20:11 2012
dev_idb01:started at : Sat Dec 1 14:51:10 2012
dev_idb01:[Thr 1] Sat Dec 1 14:51:10 2012
dev_idb01:[Thr 1] Sat Dec 1 14:51:11 2012
dev_idb01:[Thr 772] Sat Dec 1 14:51:14 2012
dev_idb01:[Thr 772] Sat Dec 1 14:51:19 2012

Regards

Reply With Quote
  #2  
Old December 4th, 2012, 08:46 AM
SimonJM SimonJM is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Mar 2006
Posts: 2,108 SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level)SimonJM User rank is General 8th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 4 h 41 m
Reputation Power: 1485
Try:

Code:
grep "Dec 2 " * | more

That will give you all the entries for that day. If you want to cut that down to just on or after that specific time I'd be more inclined to just pipe the output at a file and edit out the earlier entries.
__________________
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Grep options for a time stamp ?

Developer Shed Advertisers and Affiliates



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap