07-29-2011
AFAIK, you will not be able to get modification times, just last modification time (mtime in find).
If you want to check how many times files was modified in time interval, you have some choices :
1. Write a code to monitor if files changes (shell or C) and creates log file.
2. The app/user/whatever is changing the file will need to copy the file or code wise write somewhere that it will change it.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Does anyone know how to display the time with seconds
of when a file was last modified. I can get hour & minutes but
would also like seconds. --Running AIX (1 Reply)
Discussion started by: edog
1 Replies
2. UNIX for Dummies Questions & Answers
Hi
I am accessing a file on nfs mounted device, after completing using of the file, i am tring to restore the access time and modification times of the file.
So i got the previous modified time of the file using stat() function and trying to set the date and time for the file, To set these... (6 Replies)
Discussion started by: deepthi.s
6 Replies
3. Shell Programming and Scripting
How can I get and display the last modification time of a file? in scripting or specifically using Batch file
I want this info for me to determine whether an image has been edited or not by using the last modification time and compare it to our stored date of modification.
can somebody help... (5 Replies)
Discussion started by: jaque18
5 Replies
4. Shell Programming and Scripting
Hi All,
I would like to know the file modification time till seconds in Unix. So I tried ls -e and it worked fine. This Solaris 5.10
-rw-rw-r-- 1 test admin 22 Sep 12 11:01:37 2008 test_message
But I am not able to run the same command in SOlaris 5.6 and also in AIX/HP
Is there... (3 Replies)
Discussion started by: rahulkav
3 Replies
5. Shell Programming and Scripting
Hi All..
I have a file with a number of non-unique entries as below:
1243
01:42:29,567 --> 01:42:32,108
blah blah ....
blah blah ..
1244
01:42:32,709 --> 01:42:34,921
blah blah ....
1245
01:42:35,214 --> 01:42:36,533
blah blah ....
blah blah ..
blah blah ....
blah blah .. (4 Replies)
Discussion started by: UniRock
4 Replies
6. Shell Programming and Scripting
Hi All,
I have two files (given below) each exists under different paths. I want to compare the modification time stamp of file1.txt is lessthan the modification time of file2.txt.
month1=`ls -l file1.txt | awk '{ print $6}'`
date1=`ls -file1.txt | awk '{ print $7}'`
time1=`ls... (1 Reply)
Discussion started by: Arunprasad
1 Replies
7. Shell Programming and Scripting
Hi everyone,
I'd like to know if is there a way to list files but ignoring some according to their modification time (or creation, access time, etc.) with the command 'ls' alone.
I know the option -I exist, but it seems to only looking in the file name..
Thank you in advance for the... (8 Replies)
Discussion started by: Keyhaku
8 Replies
8. Shell Programming and Scripting
Explain it with proper e.g (4 Replies)
Discussion started by: sidpatil
4 Replies
9. Programming
First, oh great Unix gurus, forgive if this is a stupid question.
Unix/Linux is not my main thing but I have been programming in C/C++ for many years. I will do my best to be specific.
I have a program in C/C++ that needs to modify the time of a given file. Currently I do this using utime()... (5 Replies)
Discussion started by: Pug
5 Replies
10. AIX
I have to list the files of particular directory using file filter like find -name abc* something and if multiple file exist I also want time of each file up to seconds.
Currently we are getting time up to minutes in AIX is there any way I can get file last modification time up to seconds. (4 Replies)
Discussion started by: Nitesh sahu
4 Replies
LUTIMES(3) BSD Library Functions Manual LUTIMES(3)
NAME
lutimes -- set file access and modification times of symlink
SYNOPSIS
#include <sys/time.h>
int
lutimes(const char *path, struct timeval times[2]);
DESCRIPTION
The access and modification times of the file named by path are changed as specified by the argument times, even if path specifies a symbolic
link (for utimes(2) the times of the file referenced by the symbolic link are changed).
If times is NULL, the access and modification times are set to the current time. The caller must be the owner of the file, have permission
to write the file, or be the super-user.
If times is non-NULL, it is assumed to point to an array of two timeval structures. The access time is set to the value of the first ele-
ment, and the modification time is set to the value of the second element. The caller must be the owner of the file or be the super-user.
In either case, the inode-change-time of the file is set to the current time.
NOTE
Instead of being a system call, lutimes() is emulated using setattrlist(2). Not all file systems support setattrlist(2).
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, -1 is returned and the global variable errno is set to indicate the error.
ERRORS
The lutimes() call may return the same errors as utimes(2) and setattrlist(2).
SEE ALSO
utimes(2), setattrlist(2)
BSD
Aug 13, 2006 BSD