From owner-freebsd-questions@FreeBSD.ORG Sun Oct 19 05:48:50 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC4D51065688 for ; Sun, 19 Oct 2008 05:48:50 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id BB9D18FC12 for ; Sun, 19 Oct 2008 05:48:50 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id m9J5mXgl053111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 18 Oct 2008 22:48:34 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id m9J5mXKQ053110; Sat, 18 Oct 2008 22:48:33 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA23129; Sat, 18 Oct 08 22:40:49 PDT Date: Sat, 18 Oct 2008 22:46:04 -0700 From: perryh@pluto.rain.com To: freebsd@edvax.de Message-Id: <48fac99c.v09a2DdmpE7xdWZS%perryh@pluto.rain.com> References: <20081019044058.9ff31b6f.freebsd@edvax.de> In-Reply-To: <20081019044058.9ff31b6f.freebsd@edvax.de> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Inode numbering 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: Sun, 19 Oct 2008 05:48:50 -0000 Polytropon wrote: > Let's assume we have a directory D with an inode number i(D). > It contains a file F with its inode number i(F). > > May I state that i(D) < i(F)? In general, no. It might work in the special case where nothing on the filesystem is ever moved or removed, and no hard links are ever added. As a simple example, suppose I have directories foo and foo/bar, and file foo/baz, with i(foo) == 15, i(foo/baz) == 20, and i(foo/bar) == 25, satisfying your criterion. If I do mv foo/baz foo/bar (so baz is now foo/bar/baz), I will have i(foo/bar) == 25 and i(foo/bar/baz) == 20.