These commands will help you to dig out the main cause of any issue instantly. ![]() Grep " 1 " something.log | grep -i 'error' > required_data.out You need to execute command to filter required data & then redirect that data to other file (required_data.out in my case) You need to execute command to filter required data & then redirect that data to other fileĬase-2 - A User needs something.log file but only for error data of 1st October -2016 from 10 am to 11 am server time Now let us focus on what commands can help us on such requirements based on case:Ĭase-1 - A User needs issue.out file data from 1st October to 5 October There may also be requirement when you need to get all data for certain period of file. ![]() But the best part is, that log files are generated with respect to timestamp (as in my case its yyyy-mm-dd HH:MM:SS format eg. We know the log file helps alot in identifying the root cause of any issue, but we know its not that easy, even if you filter or grep with some special character strings. ![]() All the system Admin for any application supported by Unix / Linux may face this common issue multiple times, when he has to look for the root cause for any issue encountered.
0 Comments
Leave a Reply. |