Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!unido!opal!tmpmbx!scuzzy!src From: src@scuzzy.in-berlin.de (Heiko Blume) Newsgroups: comp.unix.sysv386 Subject: Re: Why do you want a 512 byte block file system anyway? Message-ID: <1990Nov29.163808.9988@scuzzy.in-berlin.de> Date: 29 Nov 90 16:38:08 GMT References: <1990Nov19.232124.7802@cichlid.com> <1990Nov21.203420.2688@scuzzy.in-berlin.de> <16063@bfmny0.BFM.COM> Distribution: comp Organization: Contributed Software Lines: 51 tneff@bfmny0.BFM.COM (Tom Neff) writes: >I hesitate to suggest someone else write a program I don't have the time >to write myself, but perhaps that awk script could be posted in some >form? It would be Real Nice if people could run something that told >them, numerically, what they currently stood to gain and/or lose by >installing a given file tree onto filesystems of various blocksizes. i rather hesitate to post something as simple as this little c program, but what the heck... main() { int x,w,n,s512,s1,s2,s3,s4,i; x=w=n=s512=s1=s2=s3=i=0; for(;;) { if((scanf("%d",&i))==-1) break;; x++; if(i % 1024 <= 512) w++; else n++; if(i <= 512) s512++; else if(i <= 1024) s1++; else if(i <= 1536) s2++; else if(i <= 2048) s3++; else s4++; } printf("<= 512: %d\n",s512); printf("<= 1024: %d\n",s1); /* but > 512 */ printf("<= 1536: %d\n",s2); /* but > 1024 */ printf("<= 2048: %d\n",s3); /* etc */ printf(">= 2048: %d\n",s4); printf("total : %d\n",x); printf("savings on %d files\n",w); printf("no savings on %d files\n",n); } to use this do a find /usr/spool/news -print | xargs ls -l | cut -c32-40 | sort > bla edit out the blank lines from bla and then do a < bla that yields the little statistic. feel free to do whatever you want to with this Great Piece Of Software (tm) :-) -- Heiko Blume <-+-> src@scuzzy.in-berlin.de <-+-> (+49 30) 691 88 93 public source archive [HST V.42bis]: scuzzy Any ACU,f 38400 6919520 gin:--gin: nuucp sword: nuucp uucp scuzzy!/src/README /your/home