Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Regarding vi commands for searching something in Log Post 302643365 by KAREENA18 on Saturday 19th of May 2012 08:28:00 AM
Old 05-19-2012
Quote:
Originally Posted by vbe
Code:
/abcd

press Esc before to be sure you are no more in mod/insert mode...
press n for next occurance
Hi ,
Thanks a lot . Is there any other way for example let say as You have guided that I have opened the abc.log file through Vi editor and if Lets say I am searching on the logs where pattern 'abcd' is there in logs and it could be in sat several places in logs so all those places it is there in logs it could get highlighted ,in Vi itself .
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Searching for multiple criteria in log files?

I would like a simple shell script that will allow me to display to screen all unsuccessful su attempts in my sulog file, for the present date. I have been trying several different combinations of commands, but I can't quite get the syntax correct. The mess I have right now (don't laugh) is... (4 Replies)
Discussion started by: Relykk
4 Replies

2. Shell Programming and Scripting

help searching log file with dates

Im tyring to create a script that will show me any lines in a file with todays date and yesterdays, the date format in the file is as follows ----- amqxfdcx.c : 728 -------------------------------------------------------- 07/12/05 09:53:20 AMQ6109: An internal WebSphere MQ error has... (3 Replies)
Discussion started by: csaunders
3 Replies

3. Linux

Searching for gaps in huge (2.2G) log file?

I've got a 2.2 Gig syslog file from our Cisco firewall appliance. The problem is that we've been seeing gaps in the syslog for anywhere from 10 minutes to 2 hours. Currently I've just been using 'less' and paging through the file to see if I can find any noticeable gaps. Obviously this isn't the... (3 Replies)
Discussion started by: deckard
3 Replies

4. Shell Programming and Scripting

Searching log

<ALM_ID>EMS Huawei/T2000 ManagedElement 589865 PTP /rack=1/shelf=1/slot=11/domain=sdh/port=1 CTP /sts3c_au4-j=64@#@1-75@#@UNEQ@#@15<ALM_ID>} Available} {{Additional Information} {} Available} {{Event Type} CommunicationsAlarm Available} {{Managed Object} {{HW_T2000_Sys vtnoc_ns:.hw_t2000}... (8 Replies)
Discussion started by: sridharragilla
8 Replies

5. Shell Programming and Scripting

Searching for a string in a log file with little movement

I have a script which tails a log file and if it finds certain strings in the data tailed it sends an email, basically like this: tail -f logfile > tmp.file & sleep 10 kill $! STRING=$(grep -c "string" tmp.file) && echo $STRING | mailx -s "Warning.." admin@123.com When the string is... (10 Replies)
Discussion started by: Moxy
10 Replies

6. AIX

"/" doesn't work on command prompt for searching commands last typed

When I use "/" to look for a particular command that I typed in the current session it says D02:-/home/user1/temp> /job ksh: /job: not found. D02:-/home/user1/temp> previously it used to fetch all the commands which had job in it.. for example subjob, endjob, joblist etc... may I... (7 Replies)
Discussion started by: meetzap
7 Replies

7. Shell Programming and Scripting

searching a file with a specified text without using conventional file searching commands

without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5 Replies

8. UNIX for Dummies Questions & Answers

Get line numbers while searching the pattern in log

Hi Folks, I am searching for a pattern in logs through putty by opening the file in vi editor and reaching to the last of the file by $ and then searching the pattern , lets say I have to search the pattern abc then it would be ?abc Now I want line numbers along with the matching pattern to be... (3 Replies)
Discussion started by: SankalpS
3 Replies

9. UNIX for Beginners Questions & Answers

Can I combine below mentioned grep commands using OR (when searching strings having spaces)

Command 1: $script | grep 'Write to ECC( SSID=MARGIN)' Command 2: $script | grep 'is not greater than existing logical processing' The above commands run my script and search the mentioned strings but I do not want to run my script twice. It is increasing run time. Can someone tell me... (3 Replies)
Discussion started by: Tanu
3 Replies

10. Shell Programming and Scripting

Log all the commands input by user at real time in /var/log/messages

Below is my script to log all the command input by any user to /var/log/messages. But I cant achieve the desired output that i want. PLease see below. function log2syslog { declare COMMAND COMMAND=$(fc -ln -0) logger -p local1.notice -t bash -i -- "$USER:$COMMAND" } trap... (12 Replies)
Discussion started by: invinzin21
12 Replies
Logger(3pm)						  LogReport's Lire Documentation					       Logger(3pm)

NAME
Lire::Logger - Lire's logging interface. SYNOPSIS
Any program: use Lire::Logger qw/ lr_info lr_debug lr_warn /; lr_info( "doing stuff " ); lr_debug( "debugging information" ); lr_warn( "encountered unexpected value: ", $value ); open( CFGFILE, "my.conf" ) or lr_err( "open error: ", $! ); DESCRIPTION
This module contains functions that should be used by everything in the Lire framework which should need logging. All logging functions take any number of parameters that will be joined together to form the message (like print(), die(), warn() and friends). lr_emerg() This logs a message at the "emerg" level and aborts your program. This probably shouldn't be used. lr_crit() This logs a message at the "crit" level and aborts your program. This should only be used when something is really broken in the Lire program or the environment. It is used a few places in Lire when assertion that should really never fail (like a DLF file with the wrong number of fields). lr_err() This logs a message at the "err" level and usually aborts your program. (It is the equivalent of a die().) The program won't abort if it's used in an eval block. Uses this for error condition. lr_warn() This logs a message at the "warning" level. Perl's builtin warn is mapped to this function. Use this for non-fatal errors. lr_notice() This logs a message at the "notice" level. This should be used for significant informational messages that the user should see. (By default, the user will only see messages at level "notice" or higher.) lr_info() This logs a message at the "info" level. Use this for general informational messages. lr_debug() This logs a message at the "debug" level. Use this for debugging messages. SEE ALSO
Lire::Program(3pm) AUTHOR
Francis J. Lacoste <flacoste@logreport.org> VERSION
$Id: Logger.pm,v 1.10 2006/07/23 13:16:29 vanbaal Exp $ COPYRIGHT
Copyright (C) 2001-2003 Stichting LogReport Foundation LogReport@LogReport.org This file is part of Lire. Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. Lire 2.1.1 2006-07-23 Logger(3pm)
All times are GMT -4. The time now is 05:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy