Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-20-2004, 06:55 AM   #1
LQ Newbie
Registered: May 2004
Location: India
Posts: 1

Rep: Reputation: 0
Question 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:

$ls -l /bin
-rwxr-xr-- 1 root root 149388 Jun 17 2003 tar
-rwxr-xr-x 1 root root 316276 Jan 25 12:52 tcsh

(output truncated.....)


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
Old 05-20-2004, 12:39 PM   #2
Registered: Oct 2002
Location: Bangalore
Distribution: Gentoo Linux
Posts: 96

Rep: Reputation: 16
From ls's man page:

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


Last edited by arvind_sv; 05-20-2004 at 12:42 PM.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
long remote mount time for samba with cifs command luna6 Linux - Networking 1 04-01-2005 12:43 PM
Command to time how long a program runs jing Linux - Newbie 1 07-19-2004 11:35 PM
help with long listing + locate stabu Linux - Newbie 2 04-03-2004 06:34 PM
route command taking a long time tpatwood Linux - Networking 1 07-01-2003 05:22 PM
tar command will only do one file at a time Travis86 Linux - Newbie 4 03-15-2003 08:27 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration