We help IT Professionals succeed at work.

File dates are wayyy off

cipherlogic
cipherlogic asked
on
232 Views
Last Modified: 2014-08-19
I have files from the future somehow. Like from 2038...some from the past in 1969...very odd. Running SunOS 5.10. Any ideas what happened?
Comment
Watch Question

GiladnCTO/CIO
CERTIFIED EXPERT

Commented:
Hi,

are you using NTP? (xntpd)
check if it's running..
also check the file /etc/ntp.conf for errors..

Author

Commented:
Hello,
NTP is not used or configured.

Note, only a few files are in this state. A few hundred, but a few by comparison .
GiladnCTO/CIO
CERTIFIED EXPERT

Commented:
Ok..this must be the dates of modification.
What are you using for backups?

Author

Commented:
Bacula.

Author

Commented:
I suspected a script from another question has done this. This is what the author of the script said.
"The dates of 1969 and 2038 are actually *common* to see in UNIX.  Those are a datestamp of 0 (Jan 1, 1969) and the a datestamp of 2^32 (2038).  So either you are passing a 0 or a really big number to get dates of those times."

The code:

#!/usr/bin/ksh
a=$( /usr/bin/date "+%Y%m%d%H%M" )
a=$(( $a - 10 ))
/usr/bin/touch -t $a /tmp/dummy
/usr/bin/find /file/path -newer /tmp/dummy -exec ls -lat {} \; >> /logfile
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I don't know how else to kill a question off...wth am I doing?

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.