01-25-2007
It seems a bit odd, but you can use the find(1) command with two -newer expressions. In short, you create two "range" files using touch(1) then search for the files modified between them. For example, say you're searching for one or more files modified between 11:55 pm and midnight on Januray 20th of this year:
touch -m -t 200701202355.00 /tmp/lower
touch -m -t 200701202359.59 /tmp/upper
find . -type f -newer /tmp/lower ! -newer /tmp/upper
Note, this range works only on a file's MODIFIED time (mtime) not its last access time (atime) or status change (ctime). You can add additional expressions to refine your search. I hope this helps.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can I determine when the particular file was created, in korn-shell. Can please someone help me. If possible please mail the solution to me.
my mail id: bharat.surana@gmail.com (1 Reply)
Discussion started by: BharatSurana
1 Replies
2. UNIX for Advanced & Expert Users
I have lot .log files in a directory.I need to take the one got created today.Is there any way to get the time of creation of a file? (6 Replies)
Discussion started by: yakyaj
6 Replies
3. Shell Programming and Scripting
I need to write a script that copies files from one directory to another that were created after "today 6:30". This script will be NOT be ran at the same time each day.
any help is appreciated. (2 Replies)
Discussion started by: jm6601
2 Replies
4. UNIX for Dummies Questions & Answers
I am using RHEL.
I wan to know the creation time of one user?
which command? (4 Replies)
Discussion started by: cqlouis
4 Replies
5. Shell Programming and Scripting
Hi ..
I have a list of filenames in a particular file. All thse files get generated in the same directory. No w i want to find out which of thse got generated last and capture that time .
Have written a while loop but seems getting struck ...
while read line
do
if
then
rvst_capt_time=... (7 Replies)
Discussion started by: ultimatix
7 Replies
6. Shell Programming and Scripting
Hello Gurus,
I am facing one issue to get a file for a specific time. There are about 300 files created between 6.30 pm to 7.15 pm everyday.
Now I wanted only the file which is created on 6.45pm. No other files required.
I have used "find" command to get the files, but not getting the expected... (3 Replies)
Discussion started by: pokhraj_d
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I'm running atq for a user and its showing 2 'at' jobs in the queue to start at a later time.
> atq
Is there any way i can find out the creation date/time of these jobs?
and ideally what job created them and what script(s) they are going to run?
All i can see is the job number and... (3 Replies)
Discussion started by: finn
3 Replies
8. Shell Programming and Scripting
Hi All,
I have scenario where I need to zip huge number of DB audit log files newer than 90 days and delete anything older than that. If the files are too huge in number,zipping will take long time and causing CPU spikes. To avoid this I wanted to segregate files based on how old they are and... (2 Replies)
Discussion started by: veeresh_15
2 Replies
9. Shell Programming and Scripting
I wanted to send an email to the client whenever there is failed record created in a /feed/HR-76/failed folder after processing of feed file.
I can find out with the help of below script that what is the new file created but that file didn't make just 15 minutes before.
... (1 Reply)
Discussion started by: puneetkhullar
1 Replies
10. UNIX for Beginners Questions & Answers
A process xyz is running and creating file1, file2, file3, .... filen. how do i know if the process has stopped and createtime of the last file (filen) is older than 5 minutes?
OS is AIX (3 Replies)
Discussion started by: malaika
3 Replies
LEARN ABOUT REDHAT
uuid_time
UUID_TIME(3) Library Functions Manual UUID_TIME(3)
NAME
uuid_time - extract the time at which the UUID was created
SYNOPSIS
#include <uuid/uuid.h>
time_t uuid_time(uuid_t uu, struct timeval *ret_tv)
DESCRIPTION
The uuid_time function extracts the time at which the supplied UUID uu was created. Note that the UUID creation time is encoded within the
UUID, and this function can only reasonably expect to extract the creation time for UUIDs created with the uuid_generate(3) function. It
may or may not work with UUIDs created by OSF DCE uuidgen.
RETURN VALUES
The time at which the UUID was created, in seconds since January 1, 1970 GMT (the epoch), is returned (see time(2)). The time at which the
UUID was created, in seconds and microseconds since the epoch, is also stored in the location pointed to by ret_tv (see gettimeofday(2)).
AUTHOR
uuid_time was written by Theodore Y. Ts'o for the ext2 filesystem utilties.
AVAILABILITY
uuid_time is part of libuuid from the e2fsprogs package and is available from http://e2fsprogs.sourceforge.net.
SEE ALSO
libuuid(3), uuid_clear(3), uuid_compare(3), uuid_copy(3), uuid_generate(3), uuid_is_null(3), uuid_parse(3), uuid_unparse(3)
E2fsprogs version 1.32 November 2002 UUID_TIME(3)