Sponsored Content
Top Forums Shell Programming and Scripting Compare file timestamp with current date. Diff must be 1 hour. Post 302383004 by taipan on Monday 28th of December 2009 02:40:42 AM
Old 12-28-2009
Works great! Tx!

p.s. would you please remove the username/password from the quoted lines. I accidentally posted them as well Smilie.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get date and time for past 1 hour from current date

Hi, I need to get the date and time for past 1 hour from the current date. Anyone know how to do so? Thanks (5 Replies)
Discussion started by: spch2o
5 Replies

2. AIX

how to grep and compare timestamp in a file with the current date

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)
Discussion started by: achu
1 Replies

3. AIX

how to grep and compare timestamp in a file with the current date

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)
Discussion started by: achu
1 Replies

4. UNIX for Advanced & Expert Users

In ksh find out the timestamp of current date?

Normally we can use %s to find out the time in second since 1970. But in my ksh, this format option is not available. Example- date +%s 1268103151 above script command won't work in ksh. Can you guys provide its equivalent ? (3 Replies)
Discussion started by: boy18nj
3 Replies

5. Shell Programming and Scripting

Compare current time to timestamp on a file

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)
Discussion started by: cillmor
1 Replies

6. Shell Programming and Scripting

Shell Script to compare files, check current date and count

Hello - I have written the following basic shell script to count files, compare files and look for a particular strings in a file. Problem 1: How do I define more than 1 file location? #!/bin/bash #this is a test script FILES=$(ls /home/student/bin/dir1, home/student/bin/dir2)... (0 Replies)
Discussion started by: DallasT
0 Replies

7. AIX

Change specific (not current) date to timestamp

Hello to all. I work at AIX system without perl installed and I am restricted user, so I am limited to bash. In script that I am writing, I have to read line from file and transform date that I found inside to Unix timestamp. Line in file look something like this: Tue Mar 29 06:59:00... (5 Replies)
Discussion started by: Hyperborejac
5 Replies

8. UNIX for Dummies Questions & Answers

How to compare a file by its timestamp and store in a different location whenever timestamp changes?

Hi All, I am new to unix programming. I am trying for a requirement and the requirement goes like this..... I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies

9. Shell Programming and Scripting

Day/Hour diff between two date

Dear All I need to find out day diff between two dates. date -d or date -- day is not working in mine system. Currently i am using below code but it gives me wrong value while month change. IP: Date 1: 20150802 11:30:45 Date 2: 20150728 16:30:45 code used: awk '{t1=$2; t2=$4;... (7 Replies)
Discussion started by: jaydeep_sadaria
7 Replies

10. Shell Programming and Scripting

Grep lines between last hour timestamp and current timestamp

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
HYLAFAX-SHUTDOWN(5F)													      HYLAFAX-SHUTDOWN(5F)

NAME
etc/shutdown - server shutdown control file DESCRIPTION
If the file etc/shutdown is present it describes when a HylaFAX server is to be shutdown and may contain a descriptive message to return to clients explaining the reason for the shutdown. This file is used by the hfaxd(8C) program. The file has the following format: <year> <month> <day> <hour> <minute> <deny> <disconnect> <shutdown message text> The first line defines the date and time the server should be shutdown and the time preceding at which unprivileged clients should be denied service or disconnected; these fields are described in more detail below. Any lines that follow the first are taken as the text of a message to return to clients when notifying them of a scheduled shutdown or when denying them service. <year> The decimal year; e.g. 1996. <month> The decimal month; e.g. 10 for October. <day> The decimal day of the month in the range [1..31]. <hour> The decimal hour since midnight; in the range [0..23]. <minute> The decimal minute after the hour; in the range [0..59]. <deny> The time prior to the shutdown time at which to deny service to unprivileged clients. This value is specified as decimal number in the form HHMM; e.g. 130 for 1 hour and 30 minutes. <disconnect> Time time prior to the shutdown time at which to disconnect unprivileged clients that are logged in to the server. This value is specified as a decimal number in the form HHMM. NOTES
This file is typically created using the ``SHUT'' command supported by hfaxd(8C). SEE ALSO
hfaxd(8C), hylafax-server(5F) January 18, 1996 HYLAFAX-SHUTDOWN(5F)
All times are GMT -4. The time now is 10:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy