Results 1 to 4 of 4
Hi,
I am new to Scripting. I am trying to find out particular file is modified in last one hour or not in script and then if that file is ...
- 07-09-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 6
Script to find out modified date for particular file
Hi,
I am new to Scripting. I am trying to find out particular file is modified in last one hour or not in script and then if that file is modified in last one hour i need to copy that file to another directory.
Can any one please provide me how to check the file is modified in one hour or not?
Thanks in Advance,
Raja.
- 07-09-2010 #2
You need to use the find command. This tests files within a directory tree that match particular criteria and prints the names of matching files. The -mmin -60 test should find files modified within the last hour. Pipe the result into the xargs command to process matching files.
Find is a rather complex command so you will have to study its man page before proceeding."I'm just a little old lady; don't try to dazzle me with jargon!"
- 07-09-2010 #3Just Joined!
- Join Date
- Jun 2010
- Posts
- 6
Thanks, I can able to do it with find....
- 07-10-2010 #4
check the 'stat' command.


