![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| copy lines from opne file to another | HIMANI | UNIX for Dummies Questions & Answers | 2 | 03-15-2008 02:57 AM |
| Purge files based on timestamp avl in file name | sureshg_sampat | Shell Programming and Scripting | 3 | 02-29-2008 08:28 AM |
| Copy only the initial 10 lines from a file to another | jockey007 | Shell Programming and Scripting | 5 | 11-02-2007 11:05 AM |
| Retaining timestamp on copy of a file | param_it | UNIX for Advanced & Expert Users | 1 | 09-10-2007 01:55 AM |
| Grabbing lines out of a file based on a date | bsp18974 | Shell Programming and Scripting | 2 | 07-17-2006 05:58 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
how to copy lines from a log file based on timestamp.
INFO [11:08:00] (RbrProcessFlifoEventSessionEJB.java INFO [11:08:00] (RbrPnrProcessEventSessionEJB.java RD; SchedDepDate: 2008-05-21; Psgr Boarded: true; Pnr Loc Value: ZSQJ3I INFO [11:08:01] (RbrPnrProcessEventSessionEJB.java RD; SchedDepDate: 2008-05-21; Psgr Boarded: true; Pnr Loc Value: RXK8XI INFO [11:08:01] (RbrPnrProcessEventSessionEJB.java RD; SchedDepDate: 2008-05-21; Psgr Boarded: true; Pnr Loc Value: QGPJBI Like this i have soo much of data. i need to grep some part of lines based on timestamp [11:08:00 to 12:20:55] pls help me out.. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
OK, do a 'grep "time stamp here" file-name > filteredLogs.tmp; cp filteredLogs.tmp whateverNameYouLike.log and voila
The grep for particular pattern will output the lines matching the criteria, and then you redirect the result to a temp file, then you copy this file with a preferred name, HTH. |
||||
| Google The UNIX and Linux Forums |