Find files modified in previous minute only


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Find files modified in previous minute only
# 8  
Old 12-04-2014
Wait, that's 59 seconds, not a minute.

Also, if you use the current time, you are fractionally though this second, so sleep a second to let a full second be included.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep from file modified one minute ago

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

2. Shell Programming and Scripting

Find list of files modified for a given day ?

find list of files modified for a given day ? if i have 10 files in my directory, i have modified only 5 ... how to display only modified files ? (1 Reply)
Discussion started by: only4satish
1 Replies

3. Shell Programming and Scripting

Find files modified in last hour sunOS 5.10

trying to find a way to locate files modified in the last hour in a shell script, unfortunately the command 'find . -mmin -60' is not supported on SunOS 5.10 (works on OpenSolaris 5.11 :mad:) Does anyone know a method of doing this in shell script on 5.10? cheers (19 Replies)
Discussion started by: rich@ardz
19 Replies

4. UNIX for Dummies Questions & Answers

Find last modified date for many files

Hello all - I've looked and have not been able to find a "find" command that will list the last modified date of files within a specific directory and its subdirectories. If anyone knows of such a command it would be very much appreciated! If possible, I would like to sort this output and have... (5 Replies)
Discussion started by: MichaelH3947
5 Replies

5. UNIX for Dummies Questions & Answers

how to find the modified files before 60 mins?

hi, I need to find all the modified files before 60 minutes in a folder. Is that possible to find using mtime in minutes? Suggestions please. Thanks for looking into it... Geetha (8 Replies)
Discussion started by: iamgeethuj
8 Replies

6. Shell Programming and Scripting

help: find and modified files script

hello all im a newbie in the linux world ..i have just started creating basic scripts in linux ..i am using rhel 5 ..the thing is i wanted to create a find script where i could find the last modified file and directory in the directory given as input by the user and storing the output in a file so... (6 Replies)
Discussion started by: tarunicon
6 Replies

7. Shell Programming and Scripting

find files modified more than a day

Hi All, I am using the below command to check the files modified within last 24hours find /home/karthik -mtime -1 -type f -exec ls -l {} \; What parameter do i need to add in the above command to check the files modified in last 2 or 3 days Kindly let me know if any other alternative... (2 Replies)
Discussion started by: karthikn7974
2 Replies

8. UNIX for Advanced & Expert Users

find files modified in a specific month

hello i need a way to list files modified in a specific month and move them to a specific directry , i mean somthing like : find . -modifiedtime "May" -print -exec /usr/bin/mv newdirectory thank u (1 Reply)
Discussion started by: omer_ome
1 Replies

9. Solaris

find files modified in a specific month

hello i need a way to list files modified in a specific month and move them to a specific directry , i mean somthing like : find . -modifiedtime "May" -print -exec /usr/bin/mv newdirectory thank u (1 Reply)
Discussion started by: omer_ome
1 Replies

10. HP-UX

find files modified in a specific month

hello i need a way to list files modified in a specific month and move them to a specific directry , i mean somthing like : find . -modifiedtime "May" -print -exec /usr/bin/mv newdirectory thank u (1 Reply)
Discussion started by: omer_ome
1 Replies
Login or Register to Ask a Question
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