Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site sdcsvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittvax!dcdwest!sdcsvax!allyn From: allyn@sdcsvax.UUCP (Allyn Fratkin) Newsgroups: net.bugs.4bsd,net.unix-wizards Subject: Re: Patch to find(1) to find large files. Message-ID: <924@sdcsvax.UUCP> Date: Sun, 9-Jun-85 01:55:32 EDT Article-I.D.: sdcsvax.924 Posted: Sun Jun 9 01:55:32 1985 Date-Received: Tue, 11-Jun-85 05:21:08 EDT References: <1842@ukma.UUCP> <663@lsuc.UUCP> <1315@hammer.UUCP> Organization: U.C. San Diego Lines: 35 Xref: watmath net.bugs.4bsd:1551 net.unix-wizards:13493 In article <1315@hammer.UUCP>, dce@hammer.UUCP (David Elliott) writes: > In article <663@lsuc.UUCP> dave@lsuc.UUCP (David Sherman) writes: > >Foo, grumble and feh! find(1) already has a "-size" option. > > Put your money where your mouth is, Dave. The above note would > imply that you can write an awk script that would generate a > find command that looks something like this: > > find dir \( -size n -o -size n+1 -o -size n+2 ... \) > > How big can a file get? This kind of thing is already built into find. You say "find / -size +10 -print" to print the names of all files >= 10 blocks. The + makes it >=, not just ==. You can also say -10 to find files <= 10 blocks. You don't need to do all that or'ing. Besides, if you're worried about granularity, the real fix would be to make the -size option take a units parameter, not make -bigger take units. If -size takes units, then Dave's statement is correct even if you're worried about granularity. (How often have you wanted that much granularity?) To really do things right, if you really must have -bigger, you'll need a -smaller option too. Of course, -size does this already. I have to agree with dave; there's no point in having two (or three!) options that do the same thing when one does quite nicely. -- From the virtual mind of Allyn Fratkin allyn@UCSD.ARPA or UCSD EMU/Pascal Project {ucbvax, decvax, ihnp4} U.C. San Diego !sdcsvax!allyn "Generally you don't see that kind of behavior in a major appliance."