Following may help you in same.
I have just provided and example for same in if else statements you can provide actions too which you want to perform, hope this helps.
Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
I'm using k-shell in unix and I want to create a file with the current system time - 60 minutes. I know I can use touch to create the file, but I'm having trouble specifying how tell it to use the current time less 60 minutes. Any ideas??? (4 Replies)
Hi,
I'm new to unix,I wanna know how can I compare timestamp of a file with its touched version.i.e I want to be sure if the touch command has worked properly i.e if the file has been touched then a msg should be printed saying success else failure.All this to be incurred in a script.
Any... (2 Replies)
Hi,
Time till when the application should run is indicated in a file. First line is hour and second line is minute.
file:
10
55
Means my application should run till 10:55.
Now in a shell script, i am trying to make that logic but with no luck.
min=`tail -n 1 /file_with_time`... (1 Reply)
I want to read a log file from a particular location.In the logfile , lines contains timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file format.Please... (1 Reply)
I want to read a log file from a particular location.In the log file each line starts with timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file... (1 Reply)
Hello,
I've created the script below to compare the content of two files with a delay of an hour. After an hour, the lines that exist in both files, will be printed and executed.
The script now uses a counter to countdown 50 minutes. But what I would prefer is to check the file timestamp of... (3 Replies)
I'm trying to compare 2 dates between current time and the timestamp on a file.
The date format is mmdd
Both return Apr 1 but when using if statement
line 11: Apr 1: command not found error is returned
#!/bin/sh
log="DateLog"
Current_Date=`date +%b%e`
Filepmdate=`ls -l /file.txt |... (1 Reply)
Hi Friends,
I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only
I can get the... (12 Replies)
So basically I have a log file and each line in this log file starts with a timestamp:
MON DD HH:MM:SS
SEP 15 07:30:01
I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies
LEARN ABOUT HPUX
uuclean
uuclean(1M)uuclean(1M)NAME
uuclean - uucp spool directory clean-up
SYNOPSIS
[options]
DESCRIPTION
The commands, including are targeted for removal from HP-UX; see the below.
scans the spool directories for files with the specified prefix and deletes all those that are older than the specified number of hours.
Options
recognizes the following options:
Clean directory instead of the spool directory. If directory is not a valid spool directory, it cannot contain ``work
files''; i.e., files whose names start with These files have special meaning to pertaining to job statistics.
Scan for files with
pre as the file prefix. Up to 10 arguments can be specified. A without any pre following will cause all files older
than the specified time to be deleted.
Files whose age is more than
time hours are deleted if the prefix test is satisfied (default time is 72 hours).
The default action for
is to remove files that are older than a specified time (see option). The option is used to find files older than
time hours; however, the files are not deleted. If the argument file is present the warning is placed in file; oth-
erwise, the warnings go to the standard output.
Only files destined for system
sys are examined. Up to 10 arguments can be specified.
The option sends mail to the owner of the file when it is deleted. If a file is specified, an entry is placed in file.
This program is typically started by (see cron(1M)).
WARNINGS
Use of commands, including is discouraged because they are targeted for removal from HP-UX. Use ftp(1) or rcp(1) instead.
FILES
spool directory
SEE ALSO uucp(1), uux(1), cron(1M), uucleanup(1M).
Tim O'Reilly and Grace Todino,
O'Reilly & Associates, Inc. USA.
Grace Todino and Dale Dougherty,
O'Reilly & Associates, Inc. USA.
TO BE OBSOLETED uuclean(1M)