LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   long listing using ls -l command display year or time of the file (http://www.linuxquestions.org/questions/linux-newbie-8/long-listing-using-ls-l-command-display-year-or-time-of-the-file-183641/)

mnd_world 05-20-2004 05:55 AM

long listing using ls -l command display year or time of the file
 
Hi! all there,
When I run the <PRE><B>ls -l</B></PRE> command in the <PRE>/bin</PRE> directory, some files
display their timestamp as the <B>date and time</B>, while some others show <B>date with the year added and no time</B>, a sample output is shown below:

<PRE>
$ls -l /bin
(contd....)
-rwxr-xr-- 1 root root 149388 Jun 17 2003 tar
-rwxr-xr-x 1 root root 316276 Jan 25 12:52 tcsh

(output truncated.....)

</PRE>

I just want to know why some files display time with the date while others displays year with the date.

Any reply will be appreciated.

Thanx in advance
Manish

arvind_sv 05-20-2004 11:39 AM

From ls's man page:

Quote:

For files with a time that is more than 6 months old or more than 1 hour into the future, the timestamp contains the year instead of the time of day.
If you want the full time, try this:
ls -l --full-time

Arvind


All times are GMT -5. The time now is 05:10 AM.