From owner-freebsd-questions@FreeBSD.ORG Sat Feb 25 02:30:29 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 03D2A16A422 for ; Sat, 25 Feb 2006 02:30:29 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 917D543D48 for ; Sat, 25 Feb 2006 02:30:28 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id F20945C99; Fri, 24 Feb 2006 21:30:27 -0500 (EST) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26115-06; Fri, 24 Feb 2006 21:30:27 -0500 (EST) Received: from [192.168.1.3] (pool-68-161-83-14.ny325.east.verizon.net [68.161.83.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id DB49C5C73; Fri, 24 Feb 2006 21:30:26 -0500 (EST) Message-ID: <43FFC142.5080807@mac.com> Date: Fri, 24 Feb 2006 21:30:26 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: lalev@uni-svishtov.bg References: <53964.193.68.172.33.1140794542.squirrel@mail.uni-svishtov.bg> In-Reply-To: <53964.193.68.172.33.1140794542.squirrel@mail.uni-svishtov.bg> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at codefab.com Cc: freebsd-questions@freebsd.org Subject: Re: ls -c vs. ls -u / manpage / architecture question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2006 02:30:29 -0000 lalev@uni-svishtov.bg wrote: [ ... ] > I could see in the source of ls that these two options > are opposite of each other, but being ignorant about > the architecture of UNIX file system, i'm not positive > that in addition to the time of last modification > and the time of last access, there is not > another time - "file status change time". > > Or is it what I suppose, that the -c option is just on by default > and no other than these 2 times are saved in the file system > info about the file. There are three timestamps kept per file in Unix (see "man 2 stat"): The time-related fields of struct stat are as follows: st_atime Time when file data last accessed. Changed by the mknod(2), utimes(2), read(2) and readv(2) system calls. st_mtime Time when file data last modified. Changed by the mkdir(2), mkfifo(2), mknod(2), utimes(2), write(2) and writev(2) system calls. st_ctime Time when file status was last changed (inode data modifi- cation). Changed by the chflags(2), chmod(2), chown(2), creat(2), link(2), mkdir(2), mkfifo(2), mknod(2), rename(2), rmdir(2), symlink(2), truncate(2), unlink(2), utimes(2), write(2) and writev(2) system calls. By default, ls uses st_mtime; -c means st_ctime; -u means st_atime. -- -Chuck