Sponsored Content
Operating Systems HP-UX find command using -mmin param Post 57696 by jmbeltran on Thursday 4th of November 2004 05:44:53 PM
Old 11-04-2004
Question find command using -mmin param

Hi Everyone,

I would like to know how to find a file which was created in the period of 20+ hours, in most common unix OS, the parameter -mmin is not supported (i.e, HP-UX, Solaris, LInux, AIX)

Could you help on this ??
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

no [find -mmin -1]

I wanna show all files like...one minute old, one hour old, five hours old and so on... in my OS (HP-UX) there's only the command .. find -name "..." -mtime -n but this is only for days, there isn't something like -mmin -n ...just don't know what to do. also the newer than option isn't... (3 Replies)
Discussion started by: svennie
3 Replies

2. Shell Programming and Scripting

Command param subst to reg expression

I want to find out Row which starts with, the user specified details to a script. In general I know what command to be given. awk '$0~/^Vi/' BReject But I need to pass on $1 param of command line at the place of 'Vi'. I tried with -v subst=$1 awk -v subst=$1 '$0~/^subst/' BReject But it... (5 Replies)
Discussion started by: videsh77
5 Replies

3. UNIX for Dummies Questions & Answers

Unix command mmin issue

hi, Function 'mmin' is not in my unix, what is the other alternative to find files created/modified in last 10 minutes. Unix Command: find . -min -10 find: bad option -min find: path-list predicate-list Thank you (1 Reply)
Discussion started by: Mohee
1 Replies

4. Solaris

Any alternative of find . -mmin 20

hi find command is not working with -mmin in Solaris Os. Do we hav any alternative to find the modified file in any specified time span ( suppose in last 1- 2 hours) Thanks (2 Replies)
Discussion started by: Prat007
2 Replies

5. Shell Programming and Scripting

unix find command without mmin option

I need to check if a file has been modified within the last x hours. My find command does not have the mmin option -- only the mtime option which is in 24 hour perriods (1 Reply)
Discussion started by: Bill Ma
1 Replies

6. Shell Programming and Scripting

Help with find –mmin in a .ksh script

I need to compare the time a file was last modified against current time and conditionally proceed. At the command prompt I can do: find MYFILE -mmin +1140 and it lists the file. But I need to test, and if true do something I’ve tried things like: if ; then if ; then etc. ... (2 Replies)
Discussion started by: tlavoie
2 Replies

7. Shell Programming and Scripting

-$arg not working for find mmin

Hi, I want to parameterise the argument for 'mmin' to find out files created/edited 'n' minutes ago. For this i have written something as simple as the following: n=10 m=-1 c=expr $n \* $m #value comes to -10 when echoed find -mmin -10 #works find -mmin $c #doesnt work ... (5 Replies)
Discussion started by: SheetalN
5 Replies

8. Shell Programming and Scripting

Find mmin, mtime, cmin not working

Dear All, We are having the script which is creating the folder on another server if it is not present using ssh. Using scp it copies copy all pdf files from local folder to server folder. After all copy is done, Just to verify i was using the below find command find... (3 Replies)
Discussion started by: yadavricky
3 Replies

9. Shell Programming and Scripting

Getting file Details with find -mmin

I'm new to this and I have done a lot of research and am 99% done with my ksh script BUT I need help with. The script looks at Journal files and reports back on any that have not been updated for 15 min. Everything works but I wanted more detail (added -ls) and now I'm getting dups. Original code:... (2 Replies)
Discussion started by: blackopz
2 Replies

10. UNIX for Dummies Questions & Answers

Find command mmin

Hi, Please tell me what the below command wil do, according to my understanding it finds files in the current and sub directories whose modification time is 5 hrs and it dont zip the already zipped files who's size is more than 4K. Am I Correct? find . -type f -mmin +300 ! -name... (1 Reply)
Discussion started by: nag_sathi
1 Replies
LOGIN_TIMES(3)						   BSD Library Functions Manual 					    LOGIN_TIMES(3)

NAME
parse_lt, in_lt, in_ltm, in_ltms, in_lts -- functions for parsing and checking login time periods LIBRARY
System Utilities Library (libutil, -lutil) SYNOPSIS
#include <sys/types.h> #include <time.h> #include <login_cap.h> login_time_t parse_lt(const char *str); int in_lt(const login_time_t *lt, time_t *ends); int in_ltm(const login_time_t *lt, struct tm *t, time_t *ends); int in_ltms(const login_time_t *lt, struct tm *t, time_t *ends); int in_lts(const login_time_t *lt, time_t *ends); DESCRIPTION
This set of functions may be used for parsing and checking login and session times against a predefined list of allowed login times as used in login.conf(5). The format of allowed and disallowed session times specified in the times.allow and times.deny capability fields in a login class are com- prised of a prefix which specifies one or more 2- or 3-character day codes, followed by a start and end time in 24 hour format separated by a hyphen. Day codes may be concatenated together to select specific days, or the special mnemonics "Any" and "All" (for any/all days of the week), "Wk" for any day of the week (excluding Saturdays and Sundays) and "Wd" for any weekend day may be used. For example, the following time period: MoThFrSa1400-2200 is interpreted as Monday, Thursday through Saturday between the hours of 2pm and 10pm. Wd0600-1800 means Saturday and Sunday, between the hours of 6am through 6pm, and Any0400-1600 means any day of the week, between 4am and 4pm. Note that all time periods reference system local time. The parse_lt() function converts the ASCII representation of a time period into a structure of type login_time_t. This is defined as: typedef struct login_time { u_short lt_start; /* Start time */ u_short lt_end; /* End time */ u_char lt_dow; /* Days of week */ } login_time_t; The lt_start and lt_end fields contain the number of minutes past midnight at which the described period begins and ends. The lt_dow field is a bit field, containing one bit for each day of the week and one bit unused. A series LTM_* macros may be used for testing bits individu- ally and in combination. If no bits are set in this field - i.e., it contains the value LTM_NONE - then the entire period is assumed invalid. This is used as a convention to mark the termination of an array of login_time_t values. If parse_lt() returns a login_time_t with lt_dow equal to LTM_NONE then a parsing error was encountered. The remaining functions provide the ability to test a given time_t or struct tm value against a specific time period or array of time peri- ods. The in_ltm() function determines whether the given time described by the struct tm passed as the second parameter falls within the period described by the first parameter. A boolean value is returned, indicating whether or not the time specified falls within the period. If the time does fall within the time period, and the third parameter to the function is not NULL, the time at which the period ends relative to the time passed is returned. The in_ltms() function is similar to in_ltm() except that the first parameter must be a pointer to an array of login_time_t objects, which is up to LC_MAXTIMES (64) elements in length, and terminated by an element with its lt_dow field set to LTM_NONE. The in_lt() and in_lts() functions are equivalent to in_ltm() and in_ltms(), respectively, with the second argument set to the current time as returned by localtime(3). RETURN VALUES
The parse_lt() function returns a filled in structure of type login_time_t containing the parsed time period. If a parsing error occurs, the lt_dow field is set to LTM_NONE (i.e., 0). The in_ltm() function returns non-zero if the given time falls within the period described by the login_time_t passed as the first parameter. The in_ltms() function returns the index of the first time period found in which the given time falls, or -1 if none of them apply. SEE ALSO
getcap(3), login_cap(3), login_class(3), login.conf(5), termcap(5) BSD
October 20, 2008 BSD
All times are GMT -4. The time now is 10:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy