Hi,
I am trying to list the year for this folder but it does not show.
See output:
==> ls -ltrde default
drwxr-xr-x 2 bea /tmp 8192 Jul 10 22:56 default
Any reasons ?
Instead of showing year it shows 22:56. Why ?
Hi,
I am trying to list the year for this folder but it does not show.
See output:
==> ls -ltrde default
drwxr-xr-x 2 bea /tmp 8192 Jul 10 22:56 default
Any reasons ?
Instead of showing year it shows 22:56. Why ?
Behaviour of ls is such that the year is displayed only for files older than 6 months. If you want the year for files less than 6 months old, you will have to write a program either in C/perl/python that does the task.
if you have --time-style in your ls man page you can display year with ls --full-time
perl command..
perl -e '@d=localtime ((stat(shift))[9]); printf "%02d-%02d-%04d %02d:%02d:%02d\n", $d[3],$d[4]+1,$d[5]+1900,$d[2],$d[1],$d[0]' file