I have a zip file on the unix server. when I unzip it using unzip command(unzip -q filename.zip),then date values are retained properly for all the files but the time stamp is getting set to 12:00 AM for the files less than 6 months to the current date.Any help is highly appreciated .Thanks in advance
So you are saying the files have the correct date, but a bad timestamp. I presume you mean file mtime.
how do you know the timestamps are "bad"? The TZ variable on UNIX affects this.
are these UNIX files, zipped on a UNIX machine.
Usually the file metadata is kept the way the originating system had it, so it seems really odd to me that the timestamps would be different from the original. If they are files (from a foreign OS) then this may not be true.
The reason for the six months thing is because
ls -l
by default displays mtime in a different format for "older" vs "newer" files. The cutoff for the change is 6 months to the second. The newer format has a timestamp.
example:
-rwxr-xr-x 1 jim None 21251 Aug 8 2011 rot.exe
-rwxr-xr-x 1 Administrators None 838 Apr 27 18:14 shl.c
The Zip file is created on windows server and it is copied to unix server and unzipped it using unzip command on unix.
After unzipping, I opened the unix file in windows explorer .I can see the old files modified time stamp as 12:00 AM instead of the actual time.When I check the same files modified date time using ls -e command in unix,it is showing the correct date time on unix .What should I do to get the correct timestamp in windows explorer or Is there any way to change the cut off value for the older files in unix from 6 months to 1 year?
Regards,
K.K
---------- Post updated at 04:01 AM ---------- Previous update was at 01:23 AM ----------
Thanks Jim for the reply.
The Zip file is created on windows server and it is copied to unix server and unzipped it using unzip command on unix.
After unzipping, I opened the unix file in windows explorer .I can see the old files modified time stamp as 12:00 AM instead of the actual time.When I check the same files modified date time using ls -e command in unix,it is showing the correct date time on unix .What should I do to get the correct timestamp in windows explorer or Is there any way to change the cut off value for the older files in unix from 6 months to 1 year?