0

This question already has an answer here:

So, I just screwed up a timezone file on my Debian system because I pointed it as a link to /etc/localtime vs. pointing /etc/localtime to it. Specifically, /usr/share/zoneinfo/America/Puerto_Rico.

I'm obviously way too deep to reinstall the server for the sake of one file. Where can I find and restore just this one file?

I'm using SMP Debian 4.9.144-3.1 (2019-02-19) x86_64.

TIA

marked as duplicate by telcoM, Rui F Ribeiro debian Apr 16 at 5:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

The command you need is:

apt-get install --reinstall tzdata

Background

To know which package contains the file you damaged, you could do a

dlocate -S /usr/share/zoneinfo/America/Puerto_Rico

or

dpkg-query -S /usr/share/zoneinfo/America/Puerto_Rico

which will tell you that the file is in the package tzdata.

Once you know that, it's just a matter of telling the package manager to reinstall that package.

  • You're a lifesaver! :D .. wish I knew more Linux – Codesmith Apr 15 at 23:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.