05-07-2008
After some additional research, I found the parameter mmin for the find cmd. That will allow me to check last modified by minutes.
Thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All:
I'm having a problem with transferring files from a CD to my AIX machine. I don't know if I am using the mount command properly. My problem is that when I take a CD that I have burned on my PC over to my AIX machine, whent the CD is mounted the file names have been changed (a more thorough... (3 Replies)
Discussion started by: GoEagles
3 Replies
2. UNIX for Dummies Questions & Answers
How can I tell what user last updated a file? (1 Reply)
Discussion started by: kirkm76
1 Replies
3. Shell Programming and Scripting
Hi
I have many file initial size zero(empty) after some munipulation , one or more file will be greater than zero. I need to send those file names if they return to zero again.
Ex.
Initially the files are zero size
Size filename
0 AAA
0 BBB
0 CCC
0 DDD... (1 Reply)
Discussion started by: Bluetoot
1 Replies
4. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
The program should search all files in current directory and it's subdirectories and list out the newest file by... (8 Replies)
Discussion started by: petel1
8 Replies
5. Shell Programming and Scripting
Hey guy's,
How can I schedule this script using AWK, what I require is it runs every minute as new data will be added to the file? And I need to capture these data and save it to the output file.
I tried using sleep 1 to allow the file to be processed but is not working.
awk '
... (35 Replies)
Discussion started by: James_Owen
35 Replies
6. Shell Programming and Scripting
Anyone knows how to use AWK to achieve the following
Sun Feb 12 00:41:01-00:41:59 Success:2 Fail:2
Sun Feb 12 00:42:01-00:42:59 Success:1 Fail:2
Sun Feb 12 01:20:01-01:20:59 Success:1 Fail:2
Mon Feb 13 22:41:01-22:41:59 Success:1 Fail:1
log file:
Success
Success
Fail
Fail
... (9 Replies)
Discussion started by: timmywong
9 Replies
7. Shell Programming and Scripting
Hi, I've been trying to develop a script that performs the parsing of a log every 1 minute and then generating some statistics. I'm fairly new to programming and this is why I come to ask if I can lend a hand.
this is my log:
xxxx 16/04/2012 17:00:52 - xxxx714 - E234 - Time= 119 ms.... (8 Replies)
Discussion started by: jockx
8 Replies
8. Shell Programming and Scripting
Hi All,
I have to work in the late nights some times for server maintenance and in a hurry to complete I am accidentally changing ownership or permission of directories :(
which have similar names ( /var in root and var of some other directory ).:confused:
Can some one suggest me with the... (1 Reply)
Discussion started by: shiek.kaleem
1 Replies
9. Shell Programming and Scripting
Hi All,
Need your help on how i can sum up the values. I have a file that contains the count and the time. I wanted to add up all the first column having the same datestamp. Please see below.
INPUT
1721 2015-12-26 00:01
1440 2015-12-26 00:02
1477 2015-12-26 00:02
411 ... (4 Replies)
Discussion started by: ernesto
4 Replies
10. Shell Programming and Scripting
Hello,
I have a list of files, an example below:
-rw-r--r-- 1 smf_oper esg 910773 Jul 6 12:52 am1slc02_ACS_201607061242571_20346.cdr
-rw-r--r-- 1 smf_oper esg 995838 Jul 6 12:52 am1slc01_ACS_201607061243125_19895.cdr
-rw-r--r-- 1 smf_oper esg 557235 Jul 6 12:52... (5 Replies)
Discussion started by: nms
5 Replies
LEARN ABOUT DEBIAN
unparse_time_approx
PARSE_TIME(3) BSD Library Functions Manual PARSE_TIME(3)
NAME
parse_time, print_time_table, unparse_time, unparse_time_approx, -- parse and unparse time intervals
LIBRARY
The roken library (libroken, -lroken)
SYNOPSIS
#include <parse_time.h>
int
parse_time(const char *timespec, const char *def_unit);
void
print_time_table(FILE *f);
size_t
unparse_time(int seconds, char *buf, size_t len);
size_t
unparse_time_approx(int seconds, char *buf, size_t len);
DESCRIPTION
The parse_time() function converts a the period of time specified in into a number of seconds. The timespec can be any number of <number
unit> pairs separated by comma and whitespace. The number can be negative. Number without explicit units are taken as being def_unit.
The unparse_time() and unparse_time_approx() does the opposite of parse_time(), that is they take a number of seconds and express that as
human readable string. unparse_time produces an exact time, while unparse_time_approx restricts the result to only include one units.
print_time_table() prints a descriptive list of available units on the passed file descriptor.
The possible units include:
second, s
minute, m
hour, h
day
week seven days
month 30 days
year 365 days
Units names can be arbitrarily abbreviated (as long as they are unique).
RETURN VALUES
parse_time() returns the number of seconds that represents the expression in timespec or -1 on error. unparse_time() and
unparse_time_approx() return the number of characters written to buf. if the return value is greater than or equal to the len argument, the
string was too short and some of the printed characters were discarded.
EXAMPLES
#include <stdio.h>
#include <parse_time.h>
int
main(int argc, char **argv)
{
int i;
int result;
char buf[128];
print_time_table(stdout);
for (i = 1; i < argc; i++) {
result = parse_time(argv[i], "second");
if(result == -1) {
fprintf(stderr, "%s: parse error
", argv[i]);
continue;
}
printf("--
");
printf("parse_time = %d
", result);
unparse_time(result, buf, sizeof(buf));
printf("unparse_time = %s
", buf);
unparse_time_approx(result, buf, sizeof(buf));
printf("unparse_time_approx = %s
", buf);
}
return 0;
}
$ ./a.out "1 minute 30 seconds" "90 s" "1 y -1 s"
1 year = 365 days
1 month = 30 days
1 week = 7 days
1 day = 24 hours
1 hour = 60 minutes
1 minute = 60 seconds
1 second
--
parse_time = 90
unparse_time = 1 minute 30 seconds
unparse_time_approx = 1 minute
--
parse_time = 90
unparse_time = 1 minute 30 seconds
unparse_time_approx = 1 minute
--
parse_time = 31535999
unparse_time = 12 months 4 days 23 hours 59 minutes 59 seconds
unparse_time_approx = 12 months
BUGS
Since parse_time() returns -1 on error there is no way to parse "minus one second". Currently "s" at the end of units is ignored. This is a
hack for English plural forms. If these functions are ever localised, this scheme will have to change.
HEIMDAL
October 31, 2004 HEIMDAL