Date: Thu, 4 Feb 2010 21:30:59 -0500 From: jhell <jhell@DataIX.net> To: Gleb Kurtsou <gleb.kurtsou@gmail.com> Cc: Ed Schouten <ed@80386.nl>, eitanadlerlist@gmail.com, Xin LI <delphij@delphij.net>, jasonspiro4@gmail.com, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: [PATCH] Support for thresholds in du(1) Message-ID: <alpine.BSF.2.00.1002041255310.53562@pragry.qngnvk.ybpny> In-Reply-To: <20100204115505.GA5272@tops.skynet.lt> References: <200902251724.40212.fbsd.hackers@rachie.is-a-geek.net> <20100204115505.GA5272@tops.skynet.lt>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 4 Feb 2010 06:55, gleb.kurtsou@ wrote: > On (25/02/2009 17:24), Mel wrote: >> Hi, >> >> attached is a small patch to add threshold support to du(1). I've been using >> it on 7-STABLE machines for a while, cause I got tired of the noise I get >> when sorting and then reformatting to human-readable. Especially since >> sorting isn't part of the equasion "I'd like to see all dirs exceeding a >> given size". >> I've not updated the manpage on -STABLE yet, should be the same as HEAD. >> >> Example usage: >> # du -xht 20m . >> 29M ./contrib/binutils >> 52M ./contrib/gcc >> 237M ./contrib >> 35M ./crypto >> 28M ./lib >> 20M ./share >> 55M ./sys/dev >> 139M ./sys >> 545M . >> >> I'll file a PR for it, if there's no objections to this feature / >> implementation, the style(9) or the usage of -t. >> -- >> Mel > > Hi, > > I've cleaned up original patch: > * fixed style and some bugs > * as suggested changed it to use expand_number > * implemented support for negative threshold values > > I find the patch very useful. Does it look ok to be commited, or should > I file a PR so it won't get lost once again. > > Example usage: > src/sys/crypto % du -ht 100k > 137K ./des > 482K . > src/sys/crypto % du -A -ht +100k > 129K ./des > 446K . > src/sys/crypto % du -ht -100k > 56K ./camellia > 11K ./salsa20 > 38K ./sha2 > 9.0K ./rc4 > 68K ./des/arch/i386 > 70K ./des/arch > 88K ./rijndael > 37K ./via > 8.0K ./hmac > 36K ./blowfish/arch/i386 > 37K ./blowfish/arch > 85K ./blowfish > > I like it!. This certainly reduces some piping but as long as it is not integrated upstream it will only become more of a responsibility on FreeBSD's behalf to maintain it. If someone has the original authors email address I would say lets include him on this and see what he thinks. This would probably be the same for the pkill thread that I am involved in to. CC'ing responsible party for that thread. Best regards. This message was supposed to arrive 9 hours ago but there was some ISP problems that prevented me from sending it. -- jhell
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1002041255310.53562>