From owner-freebsd-questions Wed Jan 8 4:34:26 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A805037B401 for ; Wed, 8 Jan 2003 04:34:24 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 378E643ED4 for ; Wed, 8 Jan 2003 04:34:23 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a023.otenet.gr [212.205.215.23]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id h08CYBDa012513; Wed, 8 Jan 2003 14:34:18 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.6/8.12.6) with ESMTP id h08AJRP7004458; Wed, 8 Jan 2003 12:19:27 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.6/8.12.6/Submit) id h08AJRpg004457; Wed, 8 Jan 2003 12:19:27 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Wed, 8 Jan 2003 12:19:27 +0200 From: Giorgos Keramidas To: JoeB Cc: questions@freebsd.org Subject: Re: LS -L command, year created field contains hour:minute instead of year Message-ID: <20030108101927.GA3944@gothmog.gr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2003-01-07 21:00, JoeB wrote: > The LS -L command will display the long info about files in a > directory. FBSD 4.0 through 4.5 LS -L command would display among > other things the month/day/year the file was created. FBSD versions > 4.6 and 4.7 displays the hour:minute the file was created in the > year field instead of the year. This is done to save some space in the output of ls(1) and yet print useful information like the `hour:minute' of modification time for files that have been modified recently (for some definition of `recently'). The same is done in other BSDs too. Here's output from a NetBSD 1.6 system that shows similar behavior: nbsd-> touch -t 199805092317.25 lala nbsd-> ls -l total 100 drwx------ 2 gk736 nis 8192 Jan 6 08:25 bin drwxr-xr-x 4 gk736 nis 8192 Jan 6 23:28 compress -rw-r----- 1 gk736 nis 30918 Jan 6 23:28 compress.tgz -rw-r--r-- 1 gk736 nis 0 May 9 1998 lala -rw-r--r-- 1 gk736 nis 2563 Jan 7 05:16 text > To me this looks like there is a bug in the routine that populates > the file's creation date field upon creation of the file and the LS > -L command is just displaying what it finds in the year field which > has been populated with incorrect data. Hmmm. I'm not sure I understand what is being said here. There is no bug at this part of ls(1). It simply prints the year at column 8 for files that have been modified way back in the past, and uses the same column to print the hour:minute of recently modified files. > I am looking for confirmation of my interpretation of the problem > from other FBSD users, before I submit PR on it. It's not really a problem, imho. You can always use the -lT options of ls(1) to print the full time information of file. - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message