linux-mips
[Top] [All Lists]

Re: How can I determine which files are used?

To: Gerald Champagne <gerald.champagne@esstech.com>
Subject: Re: How can I determine which files are used?
From: Jim Paris <jim@jtan.com>
Date: Thu, 13 Sep 2001 17:50:07 -0400
Cc: linux-mips@oss.sgi.com
In-reply-to: <3BA12877.6030505@esstech.com>; from gerald.champagne@esstech.com on Thu, Sep 13, 2001 at 04:43:19PM -0500
References: <3BA12877.6030505@esstech.com>
Reply-to: jim@jtan.com
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
> Is there a recommended method of determining which files in the
> Linux source tree are used with a given .config file?  I've already
> removed the obvious things like unused entries in the arch directory
> and a couple of driver directories, but is there a way to generate a
> list of only the files that are used?
> 
> I know I've read discussions about someday splitting up the source code
> into smaller blocks, but can someone point me towards information on how
> to prune the existing source tree?

I suppose you could do a 

make clean
find . | xargs touch -t 198001010101
make
find . -not atime -1 | xargs rm $i

Which would set all of the access times to be really old, 
rebuild everything, and then remove all files which weren't
touched during the build.

(Be careful; I didn't actually test this command and I wouldn't
trust it too much without testing it, since it's quite capable
of wiping out the whole directory)

-jim

<Prev in Thread] Current Thread [Next in Thread>