Modified Date
Hi this may not be in the correct category (forgive me if thats the case). We have a Linux back end system that is constantly creating files. We had a situation where we ran an ls inside a directory and the file date showed jul 1st. Which seemed normal because a program was probably modifying that file on today's date. When we ran a second ls one minute later it showed a file date of jun 28th. Does anyone out there have an explanation as to how this can happen? No manual modification via touch was done, so i'm not sure as to how a file date can go back in time without a user running touch on it. Your help is greatly appreciated.
To clarify the file date was on one specific file inside the directory, sorry should have mentioned that. |
Quote:
Modification date can be set from a program; archiving/compression program like 'tar', 'gzip' preserve date of the original file. |
All dates in UNIX/Linux are stored in UTC (universal time code) which is the same as GMT.
However, when you "see" a date it is displayed by your time zone setting. You can modify how you see it by changing the variable TZ in your login. That could change apparent time (and date depending on when Midnight occurs in the different time zones). However while I've seen that cause variances of 24 hours or so I've never seen it cause 2-3 days like you indicate. One reason I do often see such time reversion is during a restore from a backup (or a tar archive or cpio or dd etc...). While it is in the process of doing the restore the time it has on the file will be the current time. However once it is done with the restore the time will revert to the time on the restored file. So if I'm restoring a full backup from yesterday I'll see the current file being restored has the current time but all the other files already restored now have yesterday's time on them. (It could even be earlier than yesterday if the file was created some days before the backup.) Other than that I've never seen anything suddenly revert a date. |
Your questions looks like magic. You have to specify few more things here
Quote:
By which command or by which method you have taken backup. How many admins are there who have access to this server. Linux is not a magic, what ever happens there we are responsible for it. There are many ways and reasons. |
Quote:
|
Try running "lsof <file>" to see if the file is "open". It may be there's a process updating it of which you're unaware. The lsof command would show any PID that has the file open but won't show PIDs of files that rely on it but aren't holding it open.
|
Quote:
Still I don't think vap16oct1984 deserves a pissed off reaction like you gave. jlinkels |
Well kernalzack:
i guess you have made a negative sense of mind frame here.I am still trying to help you. I have seen many cases of time changed related issue. Where people things that it happens automatically.And its not the first time that i heard the case as you described here like time has changed automatically within 1 min. So i am more queries to figure out the where is the actual problem. But the way you talk its like kids is playing with linux. I am sorry if i heart you. But its not my intension. What i want is to prove here is that if its happed and the time stamp of file is changed automatically then there must be some solid reason behind it. i am not insulting your intelligence. i know no one is perfect in this world. We all are learning each day. Its good if we know more about linux. So pls answer my questions that i asked before. Its really help me and others to help you. So that exactly we tell where is the problem and why this happen???? Jlinkels:- Thanks a lot jlinkels, for understanding my views and point. thanks |
Quote:
By which command or by which method you have taken backup." First off I never said anything about a backup server period. So This entire paragraph is gibberish. It is like kids playing around. second "Your questions looks like magic." I was very serious in my post and judging by the other two replies i specified enough information in order to receive help which i appreciate. I'm not sure what part you thought was magical about my question or maybe you just didn't pay attention and thought i was talking about running commands off backup servers. Who really knows. So jinkels when someone says your questions look like magic, i'm sorry my friend but that is an insult. I realize how absolutely unlikely this is to happen with out human intervention thats why i turned to this forum. I wanted to ask people who have alot more experience at the same time i'm not a little kid and i was being very serious. So the main reason i was offended was vap did not even read my paragraph, he started asking questions about backup servers and main servers, I have a machine that operates on the backend that process credit card info and pulls data from mysql servers also on the backend. Then after he misread my question he told me it looks like magic, it might not have looked so magical if you would have read it right the first time, then ontop of it you tell me i'm nuts. I KNOW THIS IS UNLIKELY THAT THIS COULD HAPPEN I WAS CHECKING IF A GURU HAS EVER SEEN THIS EVER BEFORE BECAUSE I HAVE NOT! Thanks. |
It was I that mentioned backup (or restore of same) as an example of something that can cause such apparent reversion of timestamp on a file.
Did you try the lsof command suggested? |
Quote:
|
@kernelzack
Quote:
miss belief has developed here. And all these may be because of your little confusing post that you have post very first day and you mensioned about Linux backend.Looks your post Quote:
Quote:
and i dont think there is any issue if you can give some more information. It not only helps me but to some more people to wants resolve the issue. Quote:
i have given importance to the question. Lets us try to find out where the magic lies and why this happen thats it. Quote:
thanks... |
Quote:
http://www.google.com/search?hl=en&q...=f&oq=&aqi=g10 So please I know you were trying to help but read carefully before you start making cracks at me. This is ridiculous that your still trying to plead your case, i said nothing of backup systems so main servers or backup servers do not come into play here. I used the term backend so i would not have to explain the servers role because it is quite complex. I'm sorry if i confused you like you said it is like little kids playing with linux. |
@kernelzack
Quote:
with me. If you look the concept logically it does not matter especially if we are taking about updates of file from one server to other. It does not matter which server? Only thing is that in both cases (either its backend or backup server) at least two servers are required to talk with each other. Quote:
logically. Thats really work.Always try to relate the concepts an this really help you. |
Could you both please stop the bickering and just focus on solving the problem?
|
All times are GMT -5. The time now is 04:25 PM. |