I did not find a HP-UX command that shows the exact file time.
Here perl is used to print the full Unix time,
followed by a loop that compares it with the required reference time:
...what am i doing wrong??
I need to find all files older than 30 days and delete but I can't get it to pull details for ANY + times. The file below has a time stamp which is older than 1 day, however if I try and select it using any of the -time flags it just doesn't see it. (the same thing... (1 Reply)
I am using HP-UNIX , The below command doesnt display anything although i have changed a file in the directory by
toutch -t 200010101800 nfile
find /tmp/transfer/ -name "*.*" -mtime +1
Any problrm with the find command i written . .Please help ??..
Thanks,
Arun (4 Replies)
All,
Please find the below comand . I am trying to list the file that has not been accesed is past 14 days . But when you look at the display the directory "crecv1" which has date as today is displayed .. Why it is happening .
I send this code instead of ls -ltr as rm -f -r in production... (4 Replies)
Hi
I've made some test with perl script to learn more about mtime...
So, my question is :
Why the mtime from findfind /usr/local/sbin -ctime -1 -mtime -1 \( -name "*.log" -o -name "*.gz" \) -print are not the same as mtime from unix/linux in ls -ltr or in stat() function in perl : stat -... (2 Replies)
Hi guys, I am looking for a way of moving all files out of a directory with a time stamp greater then the one I specify. Can anyone suggest a way of doing so?
For example, move all files out of dir1 which were created after 17:00 into dir2.
Thanks :) (1 Reply)
What is "-mtime 0" option in find command. Does it consider the files that are of today lets say today is 4th Aug or will include files 24 hrs past from the current time???? (3 Replies)
Hi, so I was using mtime and its not behaving the way I would think its supposed too. I have two pdf files. One modified today and another 6 months ago. I upload them to the solaris server. Then I run the below find statements.
This finds my 2 files
find *.pdf -type f -name '*.pdf'
this finds... (2 Replies)
Hi,
I'm trying to find all files that have a .ksh and .p extension and that are 7 days old by using the below find command but it doesn't seem to as expected. It gives me random results.. Can someone point out what may be wrong?
find . -name "*.ksh" -o -name "*.p" -mtime -7 (2 Replies)
Discussion started by: Jazmania
2 Replies
LEARN ABOUT POSIX
ftime
FTIME(P) POSIX Programmer's Manual FTIME(P)
NAME
ftime - get date and time (LEGACY)
SYNOPSIS
#include <sys/timeb.h>
int ftime(struct timeb *tp);
DESCRIPTION
The ftime() function shall set the time and millitm members of the timeb structure pointed to by tp to contain the seconds and milliseconds
portions, respectively, of the current time in seconds since the Epoch. The contents of the timezone and dstflag members of tp after a call
to ftime() are unspecified.
The system clock need not have millisecond granularity. Depending on any granularity (particularly a granularity of one) renders code non-
portable.
RETURN VALUE
Upon successful completion, the ftime() function shall return 0; otherwise, -1 shall be returned.
ERRORS
No errors are defined.
The following sections are informative.
EXAMPLES
Getting the Current Time and Date
The following example shows how to get the current system time values using the ftime() function. The timeb structure pointed to by tp is
filled with the current system time values for time and millitm.
#include <sys/timeb.h>
struct timeb tp;
int status;
...
status = ftime(&tp);
APPLICATION USAGE
For applications portability, the time() function should be used to determine the current time instead of ftime(). Realtime applications
should use clock_gettime() to determine the current time instead of ftime().
RATIONALE
None.
FUTURE DIRECTIONS
This function may be withdrawn in a future version.
SEE ALSO
clock_getres() , ctime() , gettimeofday() , time() , the Base Definitions volume of IEEE Std 1003.1-2001, <sys/timeb.h>
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE
and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained
online at http://www.opengroup.org/unix/online.html .
IEEE /The Open Group 2003 FTIME(P)