From owner-freebsd-questions@FreeBSD.ORG Wed Jun 13 22:55:54 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BAD2E1065670 for ; Wed, 13 Jun 2012 22:55:54 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from nk11p00mm-asmtp008.mac.com (nk11p00mm-asmtp008.mac.com [17.158.161.7]) by mx1.freebsd.org (Postfix) with ESMTP id 9D2638FC08 for ; Wed, 13 Jun 2012 22:55:54 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from cswiger1.apple.com (unknown [17.209.4.71]) by nk11p00mm-asmtp008.mac.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0M5K0098LSW12S80@nk11p00mm-asmtp008.mac.com> for freebsd-questions@freebsd.org; Wed, 13 Jun 2012 21:55:29 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855,1.0.260,0.0.0000 definitions=2012-06-13_07:2012-06-13, 2012-06-13, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1206130238 From: Chuck Swiger In-reply-to: <20120613202325.GC5800@external.screwed.box> Date: Wed, 13 Jun 2012 14:55:12 -0700 Message-id: <1D62BA9B-7B6A-4313-B73F-0C7C695B7211@mac.com> References: <20120613202325.GC5800@external.screwed.box> To: Peter Vereshagin X-Mailer: Apple Mail (2.1084) Cc: freebsd-questions@freebsd.org Subject: Re: `ls -l` shows size of file other than of the folder? 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: Wed, 13 Jun 2012 22:55:54 -0000 Hi-- On Jun 13, 2012, at 1:23 PM, Peter Vereshagin wrote: > I have the directory in the file system with 2 regular files each of which is > sized as 700M according to 'ls -l'. But the torrent client and 'du -s' and 'ls > -l's 'total' show that the directory size is 300M. > > How can that be? Are there different file sizes stored on a ufs1 in their > metadata? It's very likely that these are sparse files. Your torrent client creates a file of the appropriate size via fseek()/lseek() or similar, but the space isn't actually consumed until it writes the data it is obtaining from the network.... Random link: http://www.unixguide.net/unix/sparse_file.shtml Regards, -- -Chuck