files created within last 10 mins


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers files created within last 10 mins
# 1  
Old 08-03-2005
files created within last 10 mins

Any simple 1 liners to check a directory to see if a file was created within the last 10 mins?
# 2  
Old 08-03-2005
Maybe this will help.

Code:
touch /some_dir/some_file; sleep 600; find /some_dir -newer /some_dir/some_file

# 3  
Old 08-03-2005
find /dir/to/search -name '*.*' -cmin 10

See man find to look for more time based options.

Vino
# 4  
Old 08-03-2005
GNU find will allow you to find files in this fashion .. although you wont be able to use the creation date .. the 3 options are: -amin -cmin and -mmin for access, status change and modified stamps.
# 5  
Old 08-03-2005
Seems like this is my best option so far:
touch /some_dir/some_file; sleep 600; find /some_dir -newer /some_dir/some_file

As I cannot install GNU find - as I want to run this on many servers and most of which I dont have root access...


The command above will list only the file name that are found to be newer..
How can I list the date/timestamp of only the files found aswell?
# 6  
Old 08-03-2005
Quote:
Originally Posted by frustrated1
Seems like this is my best option so far:
touch /some_dir/some_file; sleep 600; find /some_dir -newer /some_dir/some_file

As I cannot install GNU find - as I want to run this on many servers and most of which I dont have root access...


The command above will list only the file name that are found to be newer..
How can I list the date/timestamp of only the files found aswell?
find /some_dir -newer /some_dir/some_file -name '*.*' -exec ls {} \;

Vino
 
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 find directory is getting files in every 10 mins, if not then when last time file received

Dears, I am looking for a script which will work as a watch directory. I ha directory which keep getting files in every 10 mins and some time delay. I want to monitor if the directory getting the files in every 10 mins if not captured the last received file time and calculate the delay. ... (6 Replies)
Discussion started by: sadique.manzar
6 Replies

2. Shell Programming and Scripting

How to select all files added to a directory in the past 5 mins (HP-UX)?

Hey everyone, I need to select all files that were added to a specific directory in the past 5 mins and copy them over to a different directory. I am using HP-UX OS which does not have support for amin, cmin, and mmin. B/c of this, I am creating a temp file and will use the find -newer command... (7 Replies)
Discussion started by: mattkoz
7 Replies

3. Shell Programming and Scripting

Listing the file name and no of records in each files for the files created on a specific day

Hi, I want to display the file names and the record count for the files in the 2nd column for the files created today. i have written the below command which is listing the file names. but while piping the above command to the wc -l command its not working for me. ls -l... (5 Replies)
Discussion started by: Showdown
5 Replies

4. Shell Programming and Scripting

Count todays created files and old files

Hello experts, I used following approach to get listing of all files of remote server. Now I have remote server file information on same server. I am getting listing in the output.txt I want to count today's created files and old files. I want to compare the numbers... (11 Replies)
Discussion started by: dipeshvshah
11 Replies

5. Linux

Using logrotate to trim files that are created every 15 mins

I have an application (puppet) that generates report files every 15 minutes in the format: /var/lib/puppet/reports/hostname.fqdn/report-201007221515.yaml /var/lib/puppet/reports/hostname.fqdn/report-201007221530.yaml .. I only really need to keep one days worth of these reports and am trying... (0 Replies)
Discussion started by: aussieos
0 Replies

6. UNIX for Dummies Questions & Answers

how to find the modified files before 60 mins?

hi, I need to find all the modified files before 60 minutes in a folder. Is that possible to find using mtime in minutes? Suggestions please. Thanks for looking into it... Geetha (8 Replies)
Discussion started by: iamgeethuj
8 Replies

7. UNIX for Advanced & Expert Users

files created with different permissions

Hi, Within a SQL file i am calling 5 shell scripts in back ground and redirecting their outputs to different log files in a specific directory. Now when I observed is, the log files are created with different permissions even though i did not do any thing specific. For example in... (2 Replies)
Discussion started by: steria_learner
2 Replies

8. Shell Programming and Scripting

Finding files which are modified few mins ago

Hi All, I have a requirement to find out the files which are modified in the last 10 minutes. I tried the find command with -amin and -mmin options, but its not working on my AIX server. Can anyone of you could help me. Thanks in advance for your help. Raju (3 Replies)
Discussion started by: rajus19
3 Replies

9. UNIX for Dummies Questions & Answers

Files created by particular user

How i get the all the files created by particular user?? (2 Replies)
Discussion started by: Anshu
2 Replies

10. UNIX for Dummies Questions & Answers

Two Files Created For Every One?

Hello, my linux box is, for some reason, creating two files when I creat one. For example, if I create a file via the VI editor called TestFile, the box will create: TestFile TestFile~ Does anyone have any ideas as to why I'm getting that second file with the ~ at the end of it? ... (1 Reply)
Discussion started by: Atama
1 Replies
Login or Register to Ask a Question