How to find a file modified more than once


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to find a file modified more than once
# 1  
Old 02-28-2012
How to find a file modified more than once

Hi All,

How to find a file modified more than once....

Thanks in advance
# 2  
Old 02-28-2012
It is not really possible to do that without making some assumptions
1. first time file is wirtten - ctime of the file is one minute (or less) then file mtime
2. any file mtime more than one minute later than file ctime has been modified again.

That is the limit. Assuming that meets your needs what OS and shell are you using?
# 3  
Old 02-28-2012
You cannot know for sure how many times a file has been modified, unless you keep a record of some sort (e.g. you have a log for each occurrence of a file modification. Assuming each entry is on a new line, you can just grep the log file for all entries using the file name as a pattern. Unfortunately, I believe you do not have such a log, and that is why you are asking the question in the first place. Sorry...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find file by filename or with newest modified date

Hi, I have a directory that has numerous files in it, and there is two which are named "filerec_ddmmyyHH24MMSS" by the time they are created so "filerec_010615012250" was created at 01:22:50 on 1st June 2015. I need to find the most recently created of those 2 files and get the contents of... (4 Replies)
Discussion started by: finn
4 Replies

2. UNIX for Dummies Questions & Answers

To find the latest modified file in a directory

I am trying to fetch the latest modified file from a directory using the command find . -type f -exec ls -lt \{\} \+ | head | awk '{print $9}' After the O/P, I get the below mentioned error and the command doesnt terminate at all. find: ls terminated by signal 13 find: ls terminated by... (2 Replies)
Discussion started by: Sree10
2 Replies

3. UNIX for Advanced & Expert Users

How to find when cron is modified

Hi all, We use cron "/usr/rdl/sc/cccron" to execute our jobs. But sometimes it is being changed. but we are not sure when it is changed. how could we find when cron is modified. i checked cron by giving ls -l . but it is showing 2009 year. ls -l /usr/rdl/sc/cccron -r-xr-xr-x 1... (0 Replies)
Discussion started by: Divakar
0 Replies

4. Shell Programming and Scripting

How to find who opened/modified a file last

Hi *, I'm wondering if it possible to know WHO opened or modified a file last? I know it's possible with some options of find and also ls to get when the file was modified last. I'm currently supervising a file and have to log all users name who opened or modified it. Thanx a lot for any... (3 Replies)
Discussion started by: Jabarod
3 Replies

5. Shell Programming and Scripting

How to find the latest modified file from the unix server.

hi Friends, In my directory i have some files. I need to find out latest modified file. Please help me. Sreenu. (2 Replies)
Discussion started by: sreenu80
2 Replies

6. UNIX for Dummies Questions & Answers

Find most recently modified directories

How do I do it? Simple answers preferred... using BASH.. the less code the better. I want to find out where Indesign is caching PDF tmp data ... I figure this is a good way to do it.. either way i wanna know how to do it. (2 Replies)
Discussion started by: glev2005
2 Replies

7. Shell Programming and Scripting

find recently modified/ updated file

hi gurus, i would like to know how can i find logs files which were recently modified or updated? :confused: using this command? find . -name "*.log" -mtime ?? so what should i put for mtime? thanks. wee (9 Replies)
Discussion started by: lweegp
9 Replies

8. 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

9. Shell Programming and Scripting

find files modified more than a day

Hi All, I am using the below command to check the files modified within last 24hours find /home/karthik -mtime -1 -type f -exec ls -l {} \; What parameter do i need to add in the above command to check the files modified in last 2 or 3 days Kindly let me know if any other alternative... (2 Replies)
Discussion started by: karthikn7974
2 Replies

10. UNIX for Dummies Questions & Answers

how to retrieve original contents of a modified file (modified using vi)

Made changes to a file using vi editor and saved those changes now realised that the changes are not required How can I get the previous version of the file.i.e the one which was there on which I had made changes (3 Replies)
Discussion started by: novice100
3 Replies
Login or Register to Ask a Question