I am running command
stat -c%y filename on linux system.
2014-03-08 13:26:29.335545828 -0800
I am not able to understand the last -0800 thing. Anyone have any idea?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
The last field is the timezone, as an offset from the UTC timezone.
$ perl -MPOSIX -e 'print strftime("%z", localtime()),"\n"' -0400 $ perl -MPOSIX -e 'print strftime("%Z", localtime()),"\n"' EDT
I'm on the east coast of the United States, so I'm 4 hours behind UTC time, you're likely on the west coast, since your 8 hours behind. If you were ahead of UTC time it would show a plus sign (
+) instead of a minus (
NOTE: Currently we just changed from EST to EDT for day light savings time.
If you start poking around your filesystem you'll likely find some files that were created while your system was in one timezone, while some were created in the other.
$ stat afile.txt ~/.bashrc | grep Mod Modify: 2014-03-12 03:51:53.986768920 -0400 Modify: 2014-01-17 20:47:54.406548527 -0500