Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am doing research on Ext4 and I believe I understand the fundamentals of Ext4.

Ext4 stores timestamps. In my assignment, I have proposed to analyse the timestamp of Ext4 MANUALLY instead of typing the command (e.g. date -d @2220775699).

Is there a way to do so?

In addition, why does the timestamp different from the timestamp in the journaling?

Can anyone explain this to me?

share|improve this question
Isn't it just a normal Unix timestamp? – Alexei Averchenko Aug 7 '13 at 18:23
I believe so? I'm analysing it in Ubuntu. – stupidgal Aug 7 '13 at 18:53
What do you mean by "manually"? To me, that means "by hand" which seems to be exactly what you are trying to avoid. – paddy Aug 8 '13 at 3:31
@AlexeiAverchenko: The date command is a standard Unix timestamp, but the Ext4 timestamp isn't. Ext4 supports fractional seconds. – MSalters Aug 8 '13 at 8:42

If you want to translate timestamps to human-friendly description of date and time, then obviously there is a way to do it.

The functions localtime and gmtime are made specifically for this purpose; in glibc, they are implemented in terms of a function __tz_convert, which is implemented in a file tzset.c. You'll probably need to review other functions it uses, though, I haven't studied all of it - GNU source is never easy to read.

UPD: __tz_convert uses __offtime internally.

share|improve this answer

Yes, this is possible:

debugfs -R `stat /file/to/check\` /dev/hdX

I'm not sure which two timestamps you're comparing, so I can't explain the difference. (I.e. if you ask a question about a difference, at least tell us between which two things!)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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