From owner-freebsd-arch Tue Jan 2 12:17:53 2001 From owner-freebsd-arch@FreeBSD.ORG Tue Jan 2 12:17:49 2001 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mail.wgate.com (mail.wgate.com [38.219.83.4]) by hub.freebsd.org (Postfix) with ESMTP id 14A3C37B402 for ; Tue, 2 Jan 2001 12:17:49 -0800 (PST) Received: from jesup.eng.tvol.net ([10.32.2.26]) by mail.wgate.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id YMS25LMG; Tue, 2 Jan 2001 15:17:52 -0500 Reply-To: Randell Jesup To: chris@calldei.com Cc: Peter Pentchev , arch@FreeBSD.ORG Subject: Re: add -I ignoremask option to du(1) References: <20001214034803.C575@ringworld.oblivion.bg> <20001230012354.B20546@holly.calldei.com> <20001230095122.A4285@ringworld.oblivion.bg> <20001230160755.E20546@holly.calldei.com> From: Randell Jesup Date: 02 Jan 2001 15:19:01 -0500 In-Reply-To: Chris Costello's message of "Sat, 30 Dec 2000 16:07:55 -0600" Message-ID: User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Chris Costello writes: >On Saturday, December 30, 2000, Peter Pentchev wrote: >> This doesn't 1. exclude subdirectories; 2. provide per-directory stats. >> In no way does it solve the problem I mentioned in the part you quoted - >> excluding CVS/ subdirs from du output on a source tree. > > Sorry. Try: > >find . -maxdepth 1 \! \( -path '*CVS*' \) | xargs du -skc Nope. First, this considers files to be the same as directories. Second, this only excludes CVS directories from the top level - deeper CVS directories are included. Suffice it to say this series of attempts indicates that find/etc is NOT a reasonable(*) way to implement this (reasonable) request. Add the argument to du(1). Randell (*): since no one here in what should be one of the most experienced group of BSD hackers has posted a workable "unix-style" method, I conclude that it's either not possible, or at least is so non-obvious as to be effectively non-existant to any but the most experienced user. That's the problem with the old-school Unix philosophy of no program doing more than one thing, and stringing them together - the "stringing them together" part often ends up being as complicated a task as programming a solution into the program itself - or even more complicated. That's ok (sort of) if everyone using it is a programmer, and doesn't mind reinventing the wheel every few days. It's not ok for 99% of users. Sure, shell's are programming languages - but I don't really want to write a program just to find out how much disk space I'm using, or to sort the output of ls (another old argument), etc. ps. yes, I am a shell-script hacker to a degree, and have written shells, and used shells in all sorts of evil ways - but I don't want to tell everyone else to try to do that. -- Randell Jesup, Worldgate Communications, ex-Scala, ex-Amiga OS team ('88-94) rjesup@wgate.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message