Mtime issue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mtime issue
# 1  
Old 10-27-2014
Mtime issue

Dear all,

i am trying to find all files created one day before, for example 26 October, and i am using this command:

Code:
 find . -type f -daystart -mtime 1

This command in fact lists all files created on 26 October, but the files between midnight 00:00 26 Oct and 01:00 26 Oct, does not shown up.

Please any help on this?
Thank you!

Last edited by arrals_vl; 10-27-2014 at 06:10 AM..
# 2  
Old 10-27-2014
Does this happen in a timezone where the DST precisely changed on October the 26th ?
# 3  
Old 10-27-2014
Yes, the time changed on 26 October. But also the time of server has changed.
# 4  
Old 10-27-2014
I guess they are two days back due to DST shift...
# 5  
Old 10-27-2014
It would seem that -daystart is not working correctly in your version of find on dates when there is a timezone shift.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mtime or the equivalent for HP-UX

Is there a way that we can add the equivalent of "mtime +3" to HP-UX OS? AIX has mtime that can filter older than how many days, but it is hard to put it for HP-UX. I am trying to filter out the output with older than 3 days. Thank you so much!! lpstat -o |grep -v bytes |sort -nkb1 | ??... (8 Replies)
Discussion started by: danielshell
8 Replies

2. Shell Programming and Scripting

Find by name and mtime

Hi, I'm trying to find all files that have a .ksh and .p extension and that are 7 days old by using the below find command but it doesn't seem to as expected. It gives me random results.. Can someone point out what may be wrong? find . -name "*.ksh" -o -name "*.p" -mtime -7 (2 Replies)
Discussion started by: Jazmania
2 Replies

3. UNIX for Dummies Questions & Answers

rsync and mtime

Hi, I'm sure this will be covered here already somewhere, but a search didn't throw up anything. I'm trying to work out the extra bits needed in this command for this rsync so that it only copies files less than 7 days old: rsync me@host:/logs/* . I'm sure it just needs the mtime -7... (2 Replies)
Discussion started by: dlam
2 Replies

4. UNIX for Dummies Questions & Answers

(find) mtime vs. (unix) mtime

Hi I've made some test with perl script to learn more about mtime... So, my question is : Why the mtime from findfind /usr/local/sbin -ctime -1 -mtime -1 \( -name "*.log" -o -name "*.gz" \) -print are not the same as mtime from unix/linux in ls -ltr or in stat() function in perl : stat -... (2 Replies)
Discussion started by: hiddenshadow
2 Replies

5. AIX

-mtime Problem

Hi, I'm using command "find . -mtime +10 -type f -print" to list the files 10 days or older but I'm getting the files which are even created today. What am I doing wrong? Thanks. (1 Reply)
Discussion started by: Gbyte
1 Replies

6. Shell Programming and Scripting

mtime

Hi, I've some files of some past days and everyday some new files are also getting added to the same. Now how can i use mtime to get the files of the current date i.e if i want the files of 25th feb 2009 and if im finding the files on 25th 12:10 am then i should only get the files after... (4 Replies)
Discussion started by: ss_ss
4 Replies

7. UNIX for Dummies Questions & Answers

-mtime +30

Hello, Can someone help me to understand the following: find /test/rman/ -mtime +30 -exec rm '{}' \; What does -mtime +30 mean? Thanks! (1 Reply)
Discussion started by: Blue68
1 Replies

8. Shell Programming and Scripting

mtime

hi, :) consider the following statement find . -type f -mtime -1 -print here what is the use of -1 option. any help? cheers RRK (7 Replies)
Discussion started by: ravi raj kumar
7 Replies

9. UNIX for Dummies Questions & Answers

mtime help!!!!!

thank you for the help. (2 Replies)
Discussion started by: scooter17
2 Replies

10. UNIX for Dummies Questions & Answers

mtime vs ctime

:D i have a slight problem and would appreciate if someone could clarify the confusion.. i use find alot and so far i have done ok.. but it just struck me a couple of days ago that I am not quite sure what the difference between the modification time and the change time as in ctime and mtime and... (3 Replies)
Discussion started by: moxxx68
3 Replies
Login or Register to Ask a Question