Question

My Date Stamp in Catalina.out log file is based on format "Feb 12, 2014 1:00:53 PM", i wanted to search exception occurred on the specified time, how can i find that in Vi editor??? my log files are very large containing size in GB's.

Was it helpful?

Solution 2

i found a way and it worked, hope fully it will help others.

in my case vi simple search recognized space and , and - issue is only with : or / so to search Feb 12, 2014 1:00:53 PM use /Feb 12, 2014 1\:00\:53 PM

before writing : or / in search just type \ before it.

OTHER TIPS

to search in vim use the / command - type /Feb 12, 2014 1:00:53 PM and hit enter - all matches should get highlighted. Use n to move to the next occurrence and N to move to the previous occurrence.

edit:

Putting \ in front of a character will escape it so it can be used in your search - if you were trying to search and replace "http://" with "https://" you could search like :s/http:\/\//https\/\//gi - which would keep the /'s from ending your regex statement - alternatively you can use a different character to avoid the picket fences (\/\//\/\) like :s#http://#https://#gi

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top