Sponsored Content
Top Forums Shell Programming and Scripting How to check the varying file size Post 302424384 by av_vinay on Tuesday 25th of May 2010 05:57:41 AM
Old 05-25-2010
Thanks guys. The script is working fineSmilie Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Check file size

I need a unix script that will check the size of multiple files in the same directory or from a text file. (6 Replies)
Discussion started by: alnita
6 Replies

2. Shell Programming and Scripting

file size check

How can I perform size check of any character file(which switch)? For example: I have to perform certain actions if file size is not zero. How can I do that? Is this syntax fine? if test ! -z $filename then fi (2 Replies)
Discussion started by: malaymaru
2 Replies

3. Shell Programming and Scripting

To check file size

Hi All, I am in small problem.. i have one script which transfers some big files to my ftp usign normal command like put .... my problem is how to check whether my file have been transferred successfully on ftp or not... i know only inside ftp we have option like 'size' command which... (2 Replies)
Discussion started by: Shahul
2 Replies

4. Shell Programming and Scripting

Check for file size is zero or not.

I have following script on AIX/KSH if ] ; then echo "filename exists and is > 0 bytes" else echo "filename does not exist or is zero length" fi It is not working. What is wrong here??? (3 Replies)
Discussion started by: Hangman2
3 Replies

5. Shell Programming and Scripting

using if statement to check file size

Hi, Am trying to execute certain commands if the condition satisfied, but i feel i am making some mistakes in the usage of if statement here is the code #!/bin/ksh SIZE=$(ls -ltr /aemu/ws/DN.txt | tr -s ' ' | cut -d ' ' -f 5) filename=`TZ=CST+24 date +%Y%m%d` ZERO=0 if then cp... (5 Replies)
Discussion started by: aemunathan
5 Replies

6. UNIX for Advanced & Expert Users

Check the size of the file on different server

Hello, I have two servers A and B, My script is written on Server A. I am picking up the file say "abc.txt" from Server B using sftp command and putting it in a directory at Server A. Now the catch is, If the file size of "abc.txt" is greater thn the available size on Server A, thn an email... (1 Reply)
Discussion started by: Prashant Jain
1 Replies

7. Shell Programming and Scripting

Check the file size - help

I want to write a batch job (ksh) with the following requirement we have file feeds coming to our system from other team, if the file size is greater than expected then we dont need to process the file for the day and need to archive the file and send email notification to the manager saying... (5 Replies)
Discussion started by: sithara
5 Replies

8. Shell Programming and Scripting

check the file size

if ; then cp /tmp/testfolder/*.* ~/new/logs/ else echo "No files today" exit fi The problem is this doen't work when there is more than 1 file. Please tell me how to take the latest file and check the size of the file in a directory (1 Reply)
Discussion started by: sandy1028
1 Replies

9. Shell Programming and Scripting

Check a file size

I'm doing a script thats check if mylogfile.log is bigger then 5000 but i dont know how to write it. thanks in avance. (6 Replies)
Discussion started by: Froob
6 Replies

10. Shell Programming and Scripting

File size check

I am trying to check whether two files are empty or not using below if condition but its checking for only one file if ] Again I tried if && ] Need your assistance (2 Replies)
Discussion started by: Aditya_001
2 Replies
WATCHDOG.CONF(5)						File Formats Manual						  WATCHDOG.CONF(5)

NAME
watchdog.conf - configuration file for the watchdog daemon DESCRIPTION
This file carries all configuration options for the Linux watchdog daemon. Each option has to be written on a line for itself. Comments start with '#'. Blanks are ignored except after the '=' sign. An empty text after the '=' sign disables the feature as long as that makes sense. OPTIONS
interval = <interval> Set the interval between two writes to the watchdog device. The kernel drivers expects a write command every minute. Otherwise the system will be rebooted. Default value is 1 second. An interval of more than a minute can only be used with the -f command-line option. logtick = <logtick> If you enable verbose logging, a message is written into the syslog or a logfile. While this is nice, it is not necessary to get a message every 10 seconds which really fills up disk and needs CPU. logtick allows adjustment of the number of intervals skipped before a log message is written. If you use logtick = 60 and interval = 10, only every 10 minutes (600 seconds) a message is writ- ten. This may make the exact time of a crash harder to find but greatly reduces disk usage and administrator nerves if you're look- ing for a particular syslog entry in between of watchdog messages. max-load-1 = <load1> Set the maximal allowed load average for a 1 minute span. Once this load average is reached the system is rebooted. Default value is 0. That means the load average check is disabled. Be careful not to this parameter too low. To set a value less then the predefined minimal value of 2, you have to use the -f commandline option. max-load-5 = <load5> Set the maximal allowed load average for a 5 minute span. Once this load average is reached the system is rebooted. Default value is 3/4*max-load-1. Be careful not to this parameter too low. To set a value less then the predefined minimal value of 2, you have to use the -f commandline option. max-load-15 = <load15> Set the maximal allowed load average for a 15 minute span. Once this load average is reached the system is rebooted. Default value is 1/2*max-load-1. Be careful not to this parameter too low. To set a value less then the predefined minimal value of 2, you have to use the -f commandline option. min-memory = <minpage> Set the minimal amount of virtual memory that has to stay free. Note that this is in pages. Default value is 0 pages which means this test is disabled. The page size is taken from the system include files. max-temperature = <temp> Set the maximal allowed temperature. Once this temperature is reached the system is halted. Default value is 120. There is no unit conversion, so make sure you use the same unit as your hardware. Watchdog will issue warnings once the temperature increases 90%, 95% and 98% of this temperature. watchdog-device = <device> Set the watchdog device name. Default is to disable keep alive support. watchdog-timeout = <timeout> Set the watchdog device timeout during startup. If not set, the default is driver-dependent. temperature-device = <temp-dev> Set the temperature device name. Default is to disable temperature checking. file = <filename> Set file name for file mode. This option can be given as often as you like to check several files. change = <mtime> Set the change interval time for file mode. This options always belongs to the active filename, that is when finding a 'change =' line watchdog assumes it belongs to the most recently read 'file =' line. They don't neccessarily have to follow each other directly. But you cannot specify a 'change =' before a 'file ='. The default is to only stat the file and don't look for changes. Using this feature to monitor changes in /var/log/messages might require some special syslog daemon configuration, e.g. rsyslog needs "$ActionWriteAllMarkMessages on" to be set to make sure the marks are written no matter what. pidfile = <pidfilename> Set pidfile name for server test mode. This option can be given as often as you like to check several servers. See the Systemd section in watchdog (8) for more information. ping = <ip-addr> Set IP address for ping mode. This option can be used more than once to check different connections. interface = <if-name> Set interface name for network mode. This option can be used more than once to check different interfaces. test-binary = <testbin> Execute the given binary to do some user defined tests. With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/ for your test-binary configuration. test-timeout = <timeout in seconds> User defined tests may only run for <timeout> seconds. Set to 0 for unlimited. repair-binary = <repbin> Execute the given binary in case of a problem instead of shutting down the system. With enforcing SELinux policy please use the /usr/libexec/watchdog/scripts/ for your repair-binary configuration. repair-timeout = <timeout in seconds> repair command may only run for <timeout> seconds. Set to 0 for unlimited. admin = <mail-address> Email address to send admin mail to. That is, who shall be notified that the machine is being halted or rebooted. Default is 'root'. If you want to disable notification via email just set admin to en empty string. realtime = <yes|no> If set to yes watchdog will lock itself into memory so it is never swapped out. priority = <schedule priority> Set the schedule priority for realtime mode. test-directory = <test directory> Set the directory to run user test/repair scripts. Default is '/etc/watchdog.d' The /etc/watchdog.d/ is recognized by SELinux pol- icy. See the Test Directory section in watchdog(8) for more information. log-dir = <log directory> Set the log directory to capture the standard output and standard error from repair-binary and test-binary execution. Default is '/var/log/watchdog'. FILES
/etc/watchdog.conf The watchdog configuration file /etc/watchdog.d A directory containing test-or-repair commands. See the Test Directory section in watchdog(8) for more information. SEE ALSO
watchdog(8) 4th Berkeley Distribution January 2005 WATCHDOG.CONF(5)
All times are GMT -4. The time now is 05:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy