Sponsored Content
Full Discussion: tail | grep
Top Forums Shell Programming and Scripting tail | grep Post 302279313 by manas_ranjan on Thursday 22nd of January 2009 11:21:42 AM
Old 01-22-2009
use
find with xarg and wc utility
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with tail /grep needed

Hello: I'm a very newbee at UNIX/AIX. What i want to do is to tail a file from the bottom until a certain string is found and write all the lines after the found string to another file. I've tried out a lot of combination with tail and grep but doesn't find the good one. Could someone help... (4 Replies)
Discussion started by: Felix2511
4 Replies

2. Shell Programming and Scripting

tail, grep and cut

Hello all, I have some weird problem that kinda baffles me. Say I have the following test file: claudia:~/tmp$ cat testfile.txt This is a test line This is the second test line And yeah, this is the third test line Then say I want to tail the file, grep for the word "third" then... (7 Replies)
Discussion started by: sylaan
7 Replies

3. Shell Programming and Scripting

tail | grep lagging badly

I'm trying to use tail/grep to monitor a log file. The command I cooked up is: tail -n 50 -f output.log | grep 'type:system' | cut -f 5- A sample line from the log file is: 1208894862 type:system session:0 severity:4 load started the columns are tab delimited. this works ok, except... (3 Replies)
Discussion started by: WasabiVengeance
3 Replies

4. Shell Programming and Scripting

Grep or Tail in shell script

Hi, I am writing a shell script that checks catalina logs on a production system and mails me if it detects errors. It greps the logs for known errors which i have defined as variables. The problem is the logs are huge, approx 30,000 before they rotate. So I am forced to use grep instead... (3 Replies)
Discussion started by: Moxy
3 Replies

5. UNIX for Dummies Questions & Answers

Need help with a tail and a grep

I need to tail -f a file so I can monitor it as it is being written to. However, there is a lot of garbage in the file that I don't care about. So normally I would just pipe and grep for the string that is important to me. However, in this case, there are two things I need to grep for. I can't... (3 Replies)
Discussion started by: Silver11
3 Replies

6. UNIX for Dummies Questions & Answers

mulitple grep using tail

I have a basic tail/grep question. I have logs that are generated & kept in a directory called alert_audit. I am using "tail" to see the logs that are coming in, but I only need logs that contain the IP address 10.249.185. or 10.247.231. Here is the command I have, but it pulls all IP... (3 Replies)
Discussion started by: robertson1995
3 Replies

7. UNIX for Dummies Questions & Answers

Write to file using tail -f through a pipe to grep

Hi -- I'm looking to write to a file after piping output from tail -f through to grep: #write to a file for all lines with "searchtext" within in error_log: Expand|Select|Wrap|Line Numbers tail -f /var/error_log | grep searchtext > output.txt The above command... (2 Replies)
Discussion started by: ndedhia1
2 Replies

8. Shell Programming and Scripting

How do i use tail & grep in real time here??

Hi I have a file which is updated very frequently. Where in i wanted to use tail -f command in the script and wanted to grep for a particular word. But the issue is when i use tail -f filename|grep "word" ... it will show me blank until the word is found in the real time. if it shows... (13 Replies)
Discussion started by: nikhil jain
13 Replies

9. UNIX for Dummies Questions & Answers

Tail -f | grep > output.txt

hi guys, I perform a sort of monitoring. I have a server running and with tail -f | grep "Searchstring"I monitor the log-file for recent specific entries. This is ok and works fine. Now, in addition I want to have my search results not posted into the shell but into a file. I tried: tail... (3 Replies)
Discussion started by: LaUs3r
3 Replies

10. Shell Programming and Scripting

Trouble with tail and grep

Good Morning, i ran into some trouble this morning while 'improving' my monitoring stuff. i would like to get a warning when the number of mails sent (outbound) by postfix is above a certain number. so far, so easy. to test that i simply put cat /var/log/mail.info | grep 'to=<' | grep -v -e... (1 Reply)
Discussion started by: Mike
1 Replies
PATHCHK(1)						    BSD General Commands Manual 						PATHCHK(1)

NAME
pathchk -- check pathnames SYNOPSIS
pathchk [-p] pathname ... DESCRIPTION
The pathchk utility checks whether each of the specified pathname arguments is valid or portable. A diagnostic message is written for each argument that: o Is longer than PATH_MAX bytes. o Contains any component longer than NAME_MAX bytes. (The value of NAME_MAX depends on the underlying file system.) o Contains a directory component that is not searchable. It is not considered an error if a pathname argument contains a nonexistent component as long as a component by that name could be created. The options are as follows: -p Perform portability checks on the specified pathname arguments. Diagnostic messages will be written for each argument that: o Is longer than _POSIX_PATH_MAX (255) bytes. o Contains a component longer than _POSIX_NAME_MAX (14) bytes. o Contains any character not in the portable filename character set (that is, alphanumeric characters, '.', '-' and '_'). No com- ponent may start with the hyphen ('-') character. EXAMPLES
Check whether the names of files in the current directory are portable to other POSIX systems: find . -exec pathchk -p {} + or the more efficient: find . -print0 | xargs -0 pathchk -p SEE ALSO
getconf(1), pathconf(2), stat(2) STANDARDS
The pathchk utility conforms to IEEE Std 1003.1-2001 (``POSIX.1''). HISTORY
A pathchk utility appeared in NetBSD 2.0. BSD
November 9, 2010 BSD
All times are GMT -4. The time now is 04:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy