From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1YNJFR-0002cb-7R for ptxdist@pengutronix.de; Mon, 16 Feb 2015 11:49:53 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1YNJFR-0008RK-5t for ptxdist@pengutronix.de; Mon, 16 Feb 2015 11:49:53 +0100 Date: Mon, 16 Feb 2015 11:49:53 +0100 From: Michael Olbrich Message-ID: <20150216104953.GB30223@pengutronix.de> References: <1423672490-5598-1-git-send-email-r.schwebel@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1423672490-5598-1-git-send-email-r.schwebel@pengutronix.de> Subject: Re: [ptxdist] [PATCH] [RfC] ptxdist: add rootstat command Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Wed, Feb 11, 2015 at 05:34:50PM +0100, Robert Schwebel wrote: > Since we have our debug root components in .debug directories, it became > complicated to find out about the size of the root directory. Add an > option for it. 'du' can do that for you easily: $ du -sh --exclude=.debug platform-/root No need for an extra command. Michael > Signed-off-by: Robert Schwebel > --- > bin/ptxdist | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/bin/ptxdist b/bin/ptxdist > index 854648a..34605c2 100755 > --- a/bin/ptxdist > +++ b/bin/ptxdist > @@ -994,6 +994,7 @@ Misc: > newpackage create a new package Makefile in a rules dir > use 'newpackage help' for a longer description > nfsroot run a userspace NFS server and export the nfsroot > + rootstat print statistics about root directory > print print the contents of a variable, in the way > it is known by "make" > list-packages print a list of all selected packages > @@ -1959,6 +1960,16 @@ EOF > ptxd_make_log ptxd_make_nfsd > exit > ;; > + rootstat) > + if [ "${PTXDIST_VERBOSE}" == "1" ]; then > + echo "verbose" > + exit > + fi > + find ${ROOTDIR} -type f \ > + -and \! -path "*/.debug/*" -exec ls --block-size=1 -s {} \; \ > + | awk '{sum += $1} END {print sum/(1024*1024) " MB"}' > + exit > + ;; > print) > if [ ${#} -eq 0 ]; then > exit 1 > -- > 2.1.4 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de