Find files on minutes basis


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Find files on minutes basis
# 1  
Old 07-14-2006
Find files on minutes basis

Hello,

I was trying to find files which are created in last five minutes .
I tried to use command find with ntime and mtime but was not successfull then i read from this forum that we can not have a find option on minutes or seconds or hours......

Can somebody Pls expalin how can i search for last hr, min, and sec files by one single command....

Thanks
Aparna
# 2  
Old 07-14-2006
to find files which are created in last five minutes:
$ find -type f -mmin -5
# 3  
Old 07-16-2006
wrong option

Hello while running this command

find -type f -mmin -5
find: bad option -mmin

even i tried with path described too......

PLS SUGGEST
Aparna
# 4  
Old 07-16-2006
Quote:
Originally Posted by er_aparna
Hello while running this command

find -type f -mmin -5
find: bad option -mmin

even i tried with path described too......

PLS SUGGEST
Aparna
Are you running an non GNU system? I believe that only the GNU version of the find command allows you to search for files created/modified in the last few minutes or hours... However your question has been answered on this site several times before. Go to the FAQs and on that page, look for the 'advanced/complex uses of the find command'. The posts in that will be exactly what you want.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to count files on daily basis

Hi all I need to count files on a daily basis and send the output via email, what I am currently doing its simply running the following:ls -lrt *.cdr | awk '{if(($6 == "Jul") && ($7 == "13")) print $0}' | wc -l, which in this case it will count all files with extension "cdr" from the month of... (13 Replies)
Discussion started by: fretagi
13 Replies

2. Shell Programming and Scripting

Find out whether directory has been updated with files in the last 5 minutes or not

Hi, I am trying to work on this script that needs to monitor a Directory. In case there are no files received in that Directory for the last 5 minutes, it has to send out an alert. Could someone please suggest any approach for the same. Note: I did check out various previous psts -... (8 Replies)
Discussion started by: rituparna_gupta
8 Replies

3. UNIX for Advanced & Expert Users

find files modified by hours instead of minutes

Is there an easy way to find files modified by hours? If you wanted to find something modified by like 28 hours then I know you could do this: find . -mmin -1440It is pain to break out a calculator and calculate in minutes. Could you do something similar to this? I know I don't have the right... (1 Reply)
Discussion started by: cokedude
1 Replies

4. Shell Programming and Scripting

how to grep string from hourly basis files

dear all, pls help on this script.. i have many files which will be created every mins in particular directory. i want to grep a particular string from only for unique hour files. from the below code i want to grep a string from only 9th hour files . Ex files: -rw-r--r-- 1 root ... (5 Replies)
Discussion started by: steve2216
5 Replies

5. Shell Programming and Scripting

find files created within 30 minutes

find . -name *.txt -mmin -30 This is working in Redhat but not in Solaris.. What is the equivalent option in Solaris? (1 Reply)
Discussion started by: tene
1 Replies

6. Shell Programming and Scripting

sorting of files on the basis of timestamp

Hi, With the help of below script im able to get the count of all the .xml files but that count is not specific to a day ie its the total count of all .xml files what i want is specific to 1 day and that of every half an hr ie from 23 feb 2009 7 am till 23rd feb 2009 2300 am and from 07:00 to... (1 Reply)
Discussion started by: ss_ss
1 Replies

7. Shell Programming and Scripting

Find files which are <n> minutes old

Hi, i want to find certain files which are more than <n> minutes old,i have the command to find the files say <n> days old(as below) but not in terms of minutes. find . -name "14*.000" -type f -mtime +1 Is there any way to find this? Regards, Cherry (3 Replies)
Discussion started by: cherryven75
3 Replies

8. Shell Programming and Scripting

Moving files on first in first out basis

suppose in a directory there are over 20 files. I need to move the first 10 files(first in first out basis, which ever files comes first) into a separate directory. i have an idea but not sure how far this is correct, can anyone guide me on this? find /opt/logs -name "cor*" -mtime 2... (6 Replies)
Discussion started by: venkatesht
6 Replies

9. Shell Programming and Scripting

only find files older than x minutes old

I am looking for a way to show files that have been created within a certain period (say anything older than 10 minutes or so). Is there a command/series of commands I can do this with? As an example, I have the following in a directory: -rw-r--r-- 1 owner group 70175 May 16 09:10... (1 Reply)
Discussion started by: dsimpg1
1 Replies

10. UNIX for Advanced & Expert Users

find files onder than 15 minutes

Hi Friends, i have to write a script to raise a flag if there are any files that are older than 15 minutes in the directory.The directory is supplied as the parameter to the script. please help with a sample script. Thanks in advance veera (11 Replies)
Discussion started by: sveera
11 Replies
Login or Register to Ask a Question