From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GPHip-0003lj-KM for garchives@archives.gentoo.org; Mon, 18 Sep 2006 11:55:36 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k8IBsqoL024377; Mon, 18 Sep 2006 11:54:52 GMT Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k8IBoUdn001873 for ; Mon, 18 Sep 2006 11:50:31 GMT Received: by nf-out-0910.google.com with SMTP id p46so3525014nfa for ; Mon, 18 Sep 2006 04:50:30 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=bUeJWVIP2uoRQJEf4WGDF59rsH9bB68Ad7GmmqnrgnYIBr+6/HzV1CS0ggVXjwszpwO/3B2H1eD0yH3hzKTez2N6rnsq9V9+DWjotbm/3PSGOHUnj8gYN/p/TOoh6T+4srtjyPtMfqmaK1rxBBbd2Ck4v6vWro2u1xFH2YM9248= Received: by 10.78.97.7 with SMTP id u7mr3273875hub; Mon, 18 Sep 2006 04:50:30 -0700 (PDT) Received: from neptune.octopus ( [80.104.86.95]) by mx.gmail.com with ESMTP id 15sm4191203hui.2006.09.18.04.50.29; Mon, 18 Sep 2006 04:50:29 -0700 (PDT) Received: by neptune.octopus (Postfix, from userid 1000) id AC326C02B; Mon, 18 Sep 2006 13:50:26 +0200 (CEST) Date: Mon, 18 Sep 2006 13:50:26 +0200 From: Matteo Pillon To: gentoo-user@lists.gentoo.org Subject: Re: AW: [gentoo-user] [OT] Why directories aren't files? Message-ID: <20060918115026.GB12486@neptune.octopus> References: <7B97065F451A23458ED0C63B4CA5A2EA7C4ACC@SRV-EXCHANGE.AUTOonline.local> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <7B97065F451A23458ED0C63B4CA5A2EA7C4ACC@SRV-EXCHANGE.AUTOonline.local> User-Agent: Mutt/1.5.11 X-Archives-Salt: 10c5a32a-54f3-4f5c-a22a-989802a18f67 X-Archives-Hash: 41141cc230b623dd941ed091687623ac Hi, On Mon, Sep 18, 2006 at 11:49:38AM +0200, Noack, Sebastian wrote: > But independent from this aspect, a file refers in its inode to a > chunk of storage on the hard disk (or other storage medias), which > contains its data. But some files like directories don't contain data. A directory IS like a file (in my opinion), it's an inode with data, you can also see it doing an ls -l: drwxr-xr-x 2 pmatthew users 4096 27 dic 2005 a drwxr-xr-x 2 pmatthew users 40960 22 mar 16:20 b Directory 'a' shows a size of 4096, the block size, as it contains only a few files and listing them with their associated inode, needs only a block, but 'b' contains a lot of files and so needs 10 blocks to store the inode-filename list. I don't have much knoledge of how ext2 works under the hood, just guessing from the behaviour I see from higher-level tools. Thanks for your replies. Bye. -- * Pillon Matteo -- gentoo-user@gentoo.org mailing list