From owner-freebsd-questions@FreeBSD.ORG Mon Feb 18 10:29:48 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 00CDF16A474 for ; Mon, 18 Feb 2008 10:29:48 +0000 (UTC) (envelope-from wundram@beenic.net) Received: from mail.beenic.net (mail.beenic.net [83.246.72.40]) by mx1.freebsd.org (Postfix) with ESMTP id B84D113C4E3 for ; Mon, 18 Feb 2008 10:29:47 +0000 (UTC) (envelope-from wundram@beenic.net) Received: from [192.168.1.38] (a89-182-91-221.net-htp.de [89.182.91.221]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.beenic.net (Postfix) with ESMTP id 0BC34A44529 for ; Mon, 18 Feb 2008 11:29:45 +0100 (CET) From: "Heiko Wundram (Beenic)" Organization: Beenic Networks GmbH To: freebsd-questions@freebsd.org Date: Mon, 18 Feb 2008 11:29:56 +0100 User-Agent: KMail/1.9.7 References: <200802181025.m1IAPdHc060834@banyan.cs.ait.ac.th> In-Reply-To: <200802181025.m1IAPdHc060834@banyan.cs.ait.ac.th> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802181129.56727.wundram@beenic.net> Subject: Re: Get the empty space on a file system 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: Mon, 18 Feb 2008 10:29:48 -0000 Am Montag, 18. Februar 2008 11:25:39 schrieb Olivier Nicole: > How to: > > 1) knowing the name of the directory, how toknow the file system it > belongs to (not considering symbolic links, I can decide that the > directory is always a real path); > > 2) knowing the file system from 1), how to check the remaining space > in the file system? man 2 statfs man 2 statvfs The former is freebsd-specific, though (AFAIK); the latter is portable (i.e., POSIX), but might return garbage (which is also indicated in the man-page for it). -- Heiko Wundram Product & Application Development