Find the file used for local-time conversion, typically a copy or symlink of zoneinfo data.
Which path is appropriate?
/etc/localtime supplies the current timezone rules, often as a symlink into /usr/share/zoneinfo.
Detailed explanation
/etc/locale.confIncorrect. /etc/locale.conf configures locale environment.
Incorrect. /etc/locale.conf configures locale environment.
/etc/timezoneIncorrect. /etc/timezone may record an identifier but is not the compiled rule data.
Incorrect. /etc/timezone may record an identifier but is not the compiled rule data.
/etc/localtimeCorrect. /etc/localtime provides the active timezone data.
Correct. /etc/localtime provides the active timezone data.
/usr/bin/localeIncorrect. /usr/bin/locale is an executable for querying locale.
Incorrect. /usr/bin/locale is an executable for querying locale.
Try it yourself
An example you can run in a temporary verification environment.
ls -l /etc/localtimeExpected result
/etc/localtimeのfile情報。symlink環境ではzoneinfoのlink先も表示Key points
- Current timezone data
- Copy or symlink
- Separate from locale
Notes
- Environment: Linux / file metadataの読取のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.