Sponsored Content
Top Forums Shell Programming and Scripting Script to monitor for new file with ext .err and size > 0 bytes and perform a action or command Post 302605413 by MAKHAN on Wednesday 7th of March 2012 11:10:31 AM
Old 03-07-2012
Its redhat linux

---------- Post updated at 12:10 AM ---------- Previous update was at 12:09 AM ----------

Sorry cant run now as m away from my deck replying from my mobile
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Email message if file size > 0 bytes

I want to create a script that emails a file created by Informix Ace if the file size is > 0. It is a list of exceptions. No exceptions...no message This does not work: THESIZE=`ls -lA /tmp/ds_treo.txt | awk -F' ' '{print $5}'` if then (cat $DSDIR/ds_treo.txt) | mail -s "Treo... (1 Reply)
Discussion started by: poste_d_ordure
1 Replies

2. UNIX for Dummies Questions & Answers

file size in bytes is different in ftp and local pc

Hi how can it be that say i have text (xls) file that is 661 bytes when i upload it to Solaris ftp its becomes 650 byes and when i downloading it back its again 661 bytes both in my local pc and Solaris ftp the file remains not corrupted and valid (2 Replies)
Discussion started by: umen
2 Replies

3. Shell Programming and Scripting

Perform action file name written to the pipe

Hello, I have a script that monitors files uploaded via ftp. After a successful upload, the file name is written to the pipe. There is another program that reads this pipe and allows automatically run any program or script ( say test.sh ) to process the newly uploaded file. cat test.sh... (2 Replies)
Discussion started by: fed.linuxgossip
2 Replies

4. Shell Programming and Scripting

Need help in searching 2 files for strings then perform an action

I have 2 files. I basically want to search both of them to see if the 1st column ($1) matches and if it matches then check to see if the 2nd column ($2) matches, then execute some code showing the results of the matches. File 1: AAA 123 misc blah BBB 456 CCC 789 File 2: ... (2 Replies)
Discussion started by: streetfighter2
2 Replies

5. Shell Programming and Scripting

How to perform action on newest line in log using tail?

I don't quite know what I'm doing, so this simple script is proving a challenge. Here is some pseudo code that doesn't work yet: if tail -1 "WORKING.txt" >/dev/null | egrep "^NMBR=*" > /dev/null then curl -k 'http://www.myserver.com/log.cgi?input=$?' echo "hi there" fi Purpose:... (3 Replies)
Discussion started by: dihewidd
3 Replies

6. Shell Programming and Scripting

shell script - search a file and perform some action

hi, i have a service on unix platform, it will generate traces in a particular folder i want to check using shell script if traces exist, then perform some action else continue to be in loop. filename is service.tra can you please help? thanks (4 Replies)
Discussion started by: gauravah
4 Replies

7. Shell Programming and Scripting

Error PHP Fatal error: Allowed memory size of 67108864 bytes exhausted(tried to allocate 401 bytes)

While running script I am getting an error like Few lines in data are not being processed. After googling it I came to know that adding such line would give some memory to it ini_set("memory_limit","64M"); my input file size is 1 GB. Is that memory limit is based on RAM we have on... (1 Reply)
Discussion started by: elamurugu
1 Replies

8. Shell Programming and Scripting

Perform an action if certain text exist in output (PERL)

Hello, I'm attempting to write a tool that checks an IP address for existing PTR records then if there are no PTR records does a ping to see if it response. Then if there is no response, it should print a message saying This is what I have so far. #!/usr/bin/perl $nxdomain =... (4 Replies)
Discussion started by: spartan22
4 Replies

9. Shell Programming and Scripting

awk script to perform an action similar to vlookup between two csv files in UNIX

Hi, I am new to awk/unix and am trying to put together an awk script to perform an action similar to vlookup between the two csv files. Here are the contents of the two files: File 1: Date,ParentID,Number,Area,Volume,Dimensions 2014-01-01,ABC,247,83430.33,857.84,8110.76... (9 Replies)
Discussion started by: Prit Siv
9 Replies
FILESCHANGED(1) 						   User Commands						   FILESCHANGED(1)

NAME
fileschanged - displays altered files SYNOPSIS
fileschanged [OPTION...] [FILE]... DESCRIPTION
Monitors FILEs for alterations. Display the filenames of FILEs that were created, changed, deleted, started execution or finished execut- ing. -s, --show=EVENT[,...] Display created, changed, deleted, executing, or executed files (Default is "created,changed") -a, --show-all Display all file events and the associated action -f, --files-to-monitor (Default) Monitor the FILEs on the command line -l, --filelist=FILE Monitor the list of filenames inside FILE -L, --dereference Don't monitor symlinks, monitor what's pointed to -r, --recursive Monitor subdirectories of directories -t, --timeout=N Delay showing changed files for N seconds (Def=2) -p, --display-action Display action when showing altered files -x, --exec=PROG Run PROG when file is altered (PROG action filename) -?, --help Give this help list --usage Give a short usage message -V, --version Print program version FILEs must exist when monitoring begins, or they will not be monitored. REPORTING BUGS
Report bugs to <benasselstine@users.sf.net>. SEE ALSO
The full documentation for fileschanged is maintained as a Texinfo manual. If the info and fileschanged programs are properly installed at your site, the command info fileschanged should give you access to the complete manual. fileschanged 0.6.5 October 2011 FILESCHANGED(1)
All times are GMT -4. The time now is 09:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy