[CLUE-Tech] command sought

Keith Hellman khellman at mcprogramming.com
Wed Apr 7 16:08:31 MDT 2004


On Wed, Apr 07, 2004 at 12:05:18PM -0600, Friedman, Jason wrote:
> I'm trying to write a command that will report all files that are greater than a particular size.
> I tried
> find . -type f -size 1000000c
> but this looks only for files that are exactly 1000000 characters.
> 
Best I can do is this:
	 find ./ -type f | { while read file ; do S=$(stat ${file}  |sed -n 's/Size: \([01-9]*\).*/\1/p'); test -z "${S}" && continue; test $S -gt 1000000 && echo ${file} ; done ; }

I suspect a python/perl script would be more efficent.

-- 
Keith Hellman                             #include <disclaimer.h>
khellman at mcprogramming.com                from disclaimer import standard
public key @ www.mcprogramming.com

"In any project that is multi-threaded, most bugs will come from threading
issues.  This is regardless of programming language -- it's a deep, as yet
ununderstood property of threads."

-- Guido van Rossum
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://cluedenver.org/pipermail/clue-tech/attachments/20040407/9642a0c1/attachment.bin


More information about the clue-tech mailing list