The requirement here is i'm searching for a particular word from the log file between two time stamp.
The process for particular account will happen, so i need to see there is any error occurred in between before it completes. in the below code yyyyy and xxxxx are two unique fields. initially i'll search for particular account id and will get this thread and will also search for the success command through this thread and account id. but error may occur in between even though it completes successfully. i can get the start time and end time and i need to search whether this exception has occurred in between or not.
The problem here why i cant grep for the word is after this thread completes the process for one account it can also process another seller. so searching the entire file through the "exception" keyword might result in wrong analysis.
so i need to search this exception has occurred for each seller or not and that to within the particular process alone. so search should be done within the start and end of the process.
i feel find command may be used. or is there any better way or code?
The find command searches for files, it doesn't search inside files.
---------- Post updated at 08:56 AM ---------- Previous update was at 08:54 AM ----------
I don't see anything about the seller in that line, so I don't know how you could expect anything to tell them apart without more information. Are there more lines of context that could help?
Hi,
I'd like find multiple file options to fetch different types of files.
find /path...// -type f -name "*.log" -o -name "*.req" -o -name "*.txt" -mtime +5 -exec ls -l {} \;
Where as in the above command only the last .txt files its retriving but not .log and .req files can body help... (1 Reply)
Hi All
I have a requirement to find the file that are most latest to be modified in each directory. Can somebody help with the command please?
E.g of the problem.
The directory A is having sub directory which are having subdirectory an so on.
I need a command which will find the... (2 Replies)
I've been using this to search an entire directory recursively for a specific phrase in my code (html, css, php, javascript, etc.):
find dir_name -type f -exec grep -l "phrase" {} \;
The problem is that it searches ALL files in the directory 'dir_name', even binary ones such as large JPEG... (2 Replies)
Hi All.
I am learning how to use command history in UNIX, and I got a basic question.
Suppose I am in a "verylongpath" directory and I type "gedit thisfile".
At a later stage, the command is accessible from the hystory, but it is
useless if I have moved to another directory. The same... (1 Reply)
Hi,
I am writing a script where i need to list all the files that have a scecific timestamp. I get this time stamp from another file. Is it possible to do this with 'find' command?
Please let me know your valuable inputs.
Thanks
Sunny. (1 Reply)
Hi,
I am new to Unix world. Is there any command which can directly return the second occurance of a particular string in a file? Basically, I want to read the contents of the file from the second occurance of a particualr string. Can be implemented using a loop, but am just wondering if there... (5 Replies)
I am using command substitution into a find command in a script where I have built a menu to do a bunch of tasks within my unix account. When I choose the options for to find a file/files that have the same inode of the entered filename, ie hardlinks, nothing shows up. When I choose the appropiate... (2 Replies)