Sponsored Content
Top Forums Shell Programming and Scripting to check files updation in sys time Post 302447543 by steve2216 on Monday 23rd of August 2010 01:08:42 PM
Old 08-23-2010
Thanks bakunin,

Actually files will be generated in time basis in the directory named "backup".
maximum file size is 10MB. if it reach 10MB it will write another file that i mentioned code below.

i want to write a program to check these files. whether these files are updating regularly or not. it should update regularly. if it is update regularly i need to print in echo " files are updating " ... if its not updating last 15 mins , i want to print in echo " files not updating"


Code:
r--r--r--   1 lscpusr  lscpusr  10000108 Aug 23 13:39 SCP_23_08_2010_13_31_19.log
-r--r--r--   1 lscpusr  lscpusr  10000150 Aug 23 13:47 SCP_23_08_2010_13_39_20.log
-r--r--r--   1 lscpusr  lscpusr  10000110 Aug 23 13:56 SCP_23_08_2010_13_47_38.log
-r--r--r--   1 lscpusr  lscpusr  10000066 Aug 23 14:04 SCP_23_08_2010_13_56_04.log
-r--r--r--   1 lscpusr  lscpusr  10000020 Aug 23 14:12 SCP_23_08_2010_14_04_24.log
-r--r--r--   1 lscpusr  lscpusr  10000056 Aug 23 14:20 SCP_23_08_2010_14_12_28.log
-r--r--r--   1 lscpusr  lscpusr  10000094 Aug 23 14:28 SCP_23_08_2010_14_20_32.log
-r--r--r--   1 lscpusr  lscpusr  10000227 Aug 23 14:36 SCP_23_08_2010_14_28_31.log
-r--r--r--   1 lscpusr  lscpusr   4150442 Aug 23 14:39 SCP_23_08_2010_14_36_32.log

pls look the bold marked timing in code.. i want to compare file time with system time.. basic thing in this directory is files will update till it reach 10MB. after tht i'll write another file. i want to compare system timing with latest file.

Hope you understand my requirement.

Pls reply for if u want more clarity.

Last edited by Scott; 08-23-2010 at 02:21 PM.. Reason: Fixed code tags. Highlight your code before clicking the # button :)
 

9 More Discussions You Might Find Interesting

1. Red Hat

RPM Updation & Keeping User Change files during removal

Hi All, I have a RPM for an Java based application. Currently it works fine. But recently I want to implement that when newer packages gets installed over the older one, the rpm should only update the older files with the newer one (I know this could be done by rpm -Uvh xxx.rpm), but it... (0 Replies)
Discussion started by: jw_amp
0 Replies

2. Shell Programming and Scripting

check files updation

Hi All, Can anyone help to write the script to check files updation? i have files as mentioned below. which will be updated some time. i just want to check the last file is updating the data for last 15 mins or not. if its not updating i want to print NOT OK. if its updating data i want... (1 Reply)
Discussion started by: steve2216
1 Replies

3. Shell Programming and Scripting

ftp files from local sys to unix server

Hi All, can anybody explain me how to ftp files from local system to unix server using Shell scripting without using any softwares. i have developed some code but its not wrking. lclpath=/dba58/d039/ftppubd/ajay echo $lclpath cd $lclpath user='rajesh' pswd='rajesh' host="3.209.136.253"... (5 Replies)
Discussion started by: rajesh_pola
5 Replies

4. UNIX for Dummies Questions & Answers

check if two files exists at the same time in one location

Hi friends, I am trying to check if the two files i am expecting are created in a specific location. if both files does not exist, do an echo if -a ]; then echo "files not found" fi It gives me the following message: bash: Please help! :) (3 Replies)
Discussion started by: kokoro
3 Replies

5. UNIX for Dummies Questions & Answers

Check for updation/error/stuck of logs

Hi All, I'm a newbie in Linux Programming.:) Got some 500 processes running and I have around 20-30 logs updating for every 2mins on a server. The logs which i'm referring usually contains book name,run ids(not PID's),process name etc etc. I'm interested in finding out whether some particular... (1 Reply)
Discussion started by: Nand Kishor
1 Replies

6. Shell Programming and Scripting

Move all files except sys date (today) files in Solaris 10

I want to move all files from one directory to another directory excluding today (sysdate files) on daily basis. file name is in pattern file_2013031801, file_2013031802 etc (2 Replies)
Discussion started by: khattak
2 Replies

7. Shell Programming and Scripting

Shell script to find files in dir and updation

Hi, I have the shell script requirement mentioned below : List all java and c files or all files in directory and sub directories' in folder structure in current dir. then search for pattren1 in all files globally and replace with other string . And also check the date... (3 Replies)
Discussion started by: ammulu
3 Replies

8. Programming

Interactive Python 3.5+ sys.stdout.write() AND sys.stderr.write() bug?

(Apologies for any typos.) OSX 10.12.3 AND Windows 10. This is for the serious Python experts on at least 3.5.x and above... In script format sys.stdout.write() AND sys.stderr.write() seems to work correctly. Have I found a serious bug in the interactive sys.stdout.write() AND... (2 Replies)
Discussion started by: wisecracker
2 Replies

9. UNIX for Beginners Questions & Answers

Bash script to check the files based up on UST time.

i have 3 regions like AWS,EMEA,APJ and i use to get 3 files like a,b,c files at 3 am ust for AWS region in common shared path and x,y,z files At 10 am ust for EMEA and 1,2,3,4,5 files at 11 pm UST for APJ region. In this files name wont change daily it remain same but the file name is not same for... (2 Replies)
Discussion started by: saranath
2 Replies
DOVEADM-LOG(1)							      Dovecot							    DOVEADM-LOG(1)

NAME
doveadm-log - Locate, test or reopen Dovecot's log files SYNOPSIS
doveadm [-Dv] log errors doveadm [-Dv] log find [directory] doveadm [-Dv] log reopen doveadm [-Dv] log test DESCRIPTION
The doveadm log commands are used to locate and reopen the log files of dovecot(1). It's also possible to test the configured targets of the *log_path settings. OPTIONS
Global doveadm(1) options: -D Enables verbosity and debug messages. -v Enables verbosity, including progress counter. COMMANDS
log errors doveadm log errors The log errors command is used to show the last - up to 1,000 - errors and warnings. If no output is generated, no errors have occurred since the last start. log find doveadm log find [directory] The log find command is used to show the location of the log files, to which dovecot(1) sends its log messages. If dovecot(1) logs its messages through syslogd(8) and doveadm(1) could not find any log files, you can specify the directory where your syslogd writes its log files. log reopen doveadm log reopen This command causes doveadm to reopen all log files, configured in the log_path, info_log_path and debug_log_path settings. These settings are configured in /etc/dovecot/conf.d/10-logging.conf. This is for example useful after manually rotating the log files. log test doveadm log test This command causes doveadm to write the message "This is Dovecot's priority log (timestamp)" to the configured log files. The used prior- ities are: debug, info, warning, error and fatal. EXAMPLE
This example shows how to locate the log files used by dovecot(1). doveadm log find Looking for log files from /var/log Debug: /var/log/dovecot.debug Info: /var/log/mail.log Warning: /var/log/mail.log Error: /var/log/mail.log Fatal: /var/log/mail.log REPORTING BUGS
Report bugs, including doveconf -n output, to the Dovecot Mailing List <dovecot@dovecot.org>. Information about reporting bugs is avail- able at: http://dovecot.org/bugreport.html SEE ALSO
doveadm(1) Dovecot v2.1 2012-02-22 DOVEADM-LOG(1)
All times are GMT -4. The time now is 06:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy