Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!hplabs!hpcea!hpfcdc!hpcnoe!jason From: jason@hpcnoe.UUCP (Jason Zions) Newsgroups: net.sources.bugs Subject: Re: FSLS - List big files in file system Message-ID: <1620002@hpcnoe.UUCP> Date: Tue, 16-Sep-86 11:55:27 EDT Article-I.D.: hpcnoe.1620002 Posted: Tue Sep 16 11:55:27 1986 Date-Received: Mon, 22-Sep-86 07:49:59 EDT References: <573@ih1ap.UUCP> Organization: HP Colorado Networks Division Lines: 32 > >> > >> find / -size +nnn -exec ls -l {} \; > > > >You can bury the machine this way!!!! It's incredibly more efficient > >using xargs(1) instead. > > > > find / -size +nnn -print | xargs ls -l > > > > And for those of you who don't have xargs (I thought such creatures > died after v6!), you can do: > > ls -l `find / +nnn -print` What happend if the find produces more characters than can fit in a command line? Things don't work so well, the shell moans about "command line too long" or "too many arguments" or some such mumble. That's why xargs still exists in System V (well, at least HP-UX, HP's implementation of System V); it uses the smallest number of command invocations to get them all done. It's amazing how much faster shell scripts run using xargs (as opposed to -exec cmd {} \; in a find command); my disk drive doesn't walk across the room from all the fork/execs... -- This is not an official statement of Hewlett-Packard Corp., and does not necessarily reflect the views of HP. It is provided completely without warranty of any kind. Lawyers take 3d10 damage and roll a saving throw vs. ego attack. Jason Zions Hewlett-Packard Colorado Networks Division 3404 E. Harmony Road Mail Stop 102 Ft. Collins, CO 80525 {ihnp4,seismo,hplabs,gatech}!hpfcdc!hpcnoe!jason or jason@hpcnoe.fc.hp.com