LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-20-2004, 05:55 AM   #1
mnd_world
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:

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

Rep: Reputation: 16
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

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


Reply



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 11:43 AM
Command to time how long a program runs jing Linux - Newbie 1 07-19-2004 10:35 PM
help with long listing + locate stabu Linux - Newbie 2 04-03-2004 05:34 PM
route command taking a long time tpatwood Linux - Networking 1 07-01-2003 04:22 PM
tar command will only do one file at a time Travis86 Linux - Newbie 4 03-15-2003 07:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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