From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 26 01:14:02 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AFEE1065670 for ; Fri, 26 Dec 2008 01:14:02 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id 5EB468FC08 for ; Fri, 26 Dec 2008 01:14:02 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.3/8.14.3) with ESMTP id mBQ1E20L071707 for ; Thu, 25 Dec 2008 17:14:02 -0800 (PST) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.3/8.14.3/Submit) id mBQ1E2Nj071706 for hackers@freebsd.org; Thu, 25 Dec 2008 17:14:02 -0800 (PST) (envelope-from david) Date: Thu, 25 Dec 2008 17:14:02 -0800 From: David Wolfskill To: hackers@freebsd.org Message-ID: <20081226011402.GP4100@albert.catwhisker.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NjAZgGx+5kyWce/c" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: How to quickly determine if UFS2 FS is "clean" from command line? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 01:14:02 -0000 --NjAZgGx+5kyWce/c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable At work, we have some machines we're setting up that have a fair amount of UFS2 "scratch space." While we would prefer to leave the file systems in question intact iff they are "clean," we do not want to run fsck(8) against them if they are not (because we expect that it would take too long); rather, we want to merely recreate them (with newfs(8)). While I might be able to hack something together by cribbing appropriate bits of fsck_ffs(8), I'm a great deal more comfortable cobbling up glue scripts and the like -- I don't fancy myself all that much of a C coder. Anyone know of a reasonable way to quickly determine whether or not a UFS2 file system is clean from the command line? Thanks! Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --NjAZgGx+5kyWce/c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAklUL9kACgkQmprOCmdXAD1wkgCeIoaNa39wYjXwiTa/3vqu5SUJ fI0AnRemcQ5JYo+iwgm1Ghj1LCtJNwU0 =PT+g -----END PGP SIGNATURE----- --NjAZgGx+5kyWce/c--