how to list files between last 6 hours to 3 hours


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to list files between last 6 hours to 3 hours
# 1  
Old 03-25-2009
Question how to list files between last 6 hours to 3 hours

Hi Frens,

I want to list some files from a directory, which contains "DONE" in their name, i am receiving files every minute. In this i want to list all the files which are newer than 6 hours but older than 3 hours, of current time

i dont want my list to contain the latest files which are received in last 3 hours , likewise which are received before 6 hours, of the current time.

Any clues??

Thanks so much in advance
# 2  
Old 03-25-2009
Hi,

This should work..

Code:
find dirname -type f -mmin -360 ! -mmin -180

Thanks
SHa
# 3  
Old 03-25-2009
Thanks much, it should give the desired result but mmin does not work for me, do we have any other option?
# 4  
Old 03-25-2009
use forum's 'Search' function for similar threads - search for 'newer'.
This is one of the threads you might find useful.
'man find'
'man touch'
# 5  
Old 03-25-2009
Thanks so much , will try these options Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

List files which access before 2 hours in solaris

Hi Friends, I want to the list the files in the folder which was access before 2 hours in Solaris. Thanks in advance...... (3 Replies)
Discussion started by: natraj005
3 Replies

2. Shell Programming and Scripting

List of Running Jobs In Last 4 Hours

Hi Experts, Please help me in this. I am trying this code on AIX 5.3. I need list of jobs that executed in last 4 hours. I have a schedule on this script - cron executes it and sends mail to me for every 2 hours. I have a Job time and have around 100 jobs those execute daily. What all i need... (2 Replies)
Discussion started by: rajubollas
2 Replies

3. Homework & Coursework Questions

list of files modified 10 hours ago using grep

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Here is the question: Make a list of files in your home directory that were changed less that 10 hours ago,... (3 Replies)
Discussion started by: fight4love
3 Replies

4. Shell Programming and Scripting

ls files newer than 6 hours

How do I list al files in a folder with a creation date/time newer than 6 hours? (2 Replies)
Discussion started by: locoroco
2 Replies

5. Shell Programming and Scripting

files older than few hours

Hi All I need to know the command which can be used to list the files which are 3 hours old so that it can be deleted. (3 Replies)
Discussion started by: mskalyani9
3 Replies

6. Shell Programming and Scripting

How to find files by hours old?

I need to be able to do the following: Find files in multiple directories that are 6 hours older than the current time? I am using KSH I tried mmtime but it was not a valid option Any help would be great. Thank you! (2 Replies)
Discussion started by: llsmr777
2 Replies

7. Shell Programming and Scripting

list the file created before 24 hours using ls command

I want to list the files created before past 24 hours using ls command. please help me on this (7 Replies)
Discussion started by: jayaramanit
7 Replies

8. Shell Programming and Scripting

Files created in last 24 hours

I need a script which list the files which is starting with the word heap*** and that is created before past 24 hours.I need the script using find command. please help me on this. (1 Reply)
Discussion started by: jayaramanit
1 Replies

9. UNIX for Dummies Questions & Answers

Finding only those files older than 2 hours

I need to write a program that will only remove those files that are older than 2 hours. Is there some variation of find . -mtime ? -name '*' that I can use? Thanks as always for your help. Regards, Dave :) (2 Replies)
Discussion started by: mh53j_fe
2 Replies

10. UNIX for Dummies Questions & Answers

delete files that are over 2 hours old

guys, I have a need for a script that will delete all files in a given directory that are over 2 hours old. I will set this up to run in cron. I'm having a little trouble coming up with the syntax that will identify these files. Is there a variation of the ls command that I can use to identify... (3 Replies)
Discussion started by: hedrict
3 Replies
Login or Register to Ask a Question