From owner-freebsd-current@FreeBSD.ORG Sun Oct 24 23:05:12 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28C6A16A4CE for ; Sun, 24 Oct 2004 23:05:12 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FB4E43D5C for ; Sun, 24 Oct 2004 23:05:11 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from gothmog.gr (patr530-a217.otenet.gr [212.205.215.217]) i9ON4sio018161; Mon, 25 Oct 2004 02:05:04 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i9ON4S32001534; Mon, 25 Oct 2004 02:04:28 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i9ON4SmB001533; Mon, 25 Oct 2004 02:04:28 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Mon, 25 Oct 2004 02:04:28 +0300 From: Giorgos Keramidas To: "Jason C. Wells" Message-ID: <20041024230428.GA1439@gothmog.gr> References: <20041016142502.6362d396@Magellan.Leidinger.net> <20041023.194558.63828926.imp@bsdimp.com> <20041024124805.378e6bc3@Magellan.Leidinger.net> <20041024131927.GA60644@voi.aagh.net> <12D1A2B7719A7312364675CC@[192.168.1.16]> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12D1A2B7719A7312364675CC@[192.168.1.16]> cc: current@freebsd.org Subject: Re: RFC: automated way of removing old base system files (only for a recent 6-current!) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Oct 2004 23:05:12 -0000 On 2004-10-24 09:38, "Jason C. Wells" wrote: > I realize that I am a bit of a late comer to this discussion. I use this > method to remove old files. You guys might gasp in horror, but it seems to > work. The actual script is a bit longer. I do this on RELENG_5 but that > shouldn't matter. > > # make buildworld > # touch time_marker > # make installworld > # find $dir \! -path $includes_and_others \! -type d \! -newer time_marker > -exec rm {} \; > > I only recently started doing this on a system that I mostly compile > software on. I did end up having to remake a port that was linked to a > library that was deleted. That's no biggy on a hobby box. > > My motivation was to delete items that I had NO_* (bind, sendmail) options > for in make.conf. I use something similar here. I run find on specific directories and use the -x option though with -mtime: # make installworld # find / -x -mtime 1h > /tmp/files.root # find /var -x -mtime 1h > /tmp/files.var # find /usr -x -mtime 1h > /tmp/files.var Then I manually skim through the lists and see if I want to keep something listed in there. Eventually, I delete the obsolete files with something like: # for filelist in /tmp/files.* ;do xargs chflags noschg < ${filelist} xargs rm -fr < ${filelist} done