Yesterday I was going through my old files modified since last two years. I was wondering with format of modification time in output of ls command.
$ ls -l /mnt/media/study -rw------- 1 rahul rahul 915284 Feb 18 2010 operating_system_principles_7_Solutions.pdf
Then I went back to home directory where there was a one file and did ls.
$ ls -l -rwx------ 1 rahul rahul 1244 Dec 31 21:44 postponed
If I compare the output of ls above, I have noticed change in format of modification time.
In first case, it displayed month, date, year. But in second case, it was month, date, time. Why format is changed for these two files?
I went back to implementation of ls in core utils. Found another beauty of ls. If file is modified in last six months then format of modification is month, date and time otherwise month, date and year.