Date: Sun, 22 Jan 2012 13:43:22 -0600 From: cliftonr@volcano.org To: Matthew Seaman <m.seaman@infracaninophile.co.uk> Cc: freebsd-stable@freebsd.org Subject: Re: GENERIC make buildkernel error / fails - posix_fadvise Message-ID: <e5978cc4910860e6fc86d11b6fdf7baa@volcano.org> In-Reply-To: <4F1C609B.3010800@infracaninophile.co.uk> References: <20120111161110.4258969c.rpclark@tds.net> <CAN-pd=cPY=Eg1RintaBx6GAon3FsLm-X0h6yvSBxzq=EZ5ukbg@mail.gmail.com> <20120112200843.2a348d2f.rpclark@tds.net> <4F0F8E6F.8000909@FreeBSD.org> <74dee0a775b93db4771f4de96eaf86c2@volcano.org> <4F1C609B.3010800@infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 22.01.2012 13:16, Matthew Seaman wrote: > On 22/01/2012 19:00, cliftonr@volcano.org wrote: >> If rm had an option to take files from standard input, or if >> there's another program I'm not aware of which does this, it >> could serve as the right-hand side of this. > > xargs(1) -- generic solution to taking a list of command arguments > from > a file or pipe, and building a command line from them. ... > xargs(1) is very commonly used in pipelines with find(1). Thanks for making it clear that my comment was unclear. :-) I had meant a program which reads the input file list as xargs does and operates directly on its operands as xargs does I'm very familiar with xargs, and have used it in many a shell script. However, it has the weakness that it will end up doing many invocations on the executable operand, as it batches up the input into command line arguments. I don't know to what extent that overhead would compare to the other sources of overhead discussed earlier, or the overhead of executing a Perl interpreter opcode per input, but I'd guess it's higher. I think I tried that specific comparison of xargs rm vs. perl -nle unlink once, some years ago, for some kind of temp file cleanup, and found the latter was faster. I don't have any numbers though, and if I did they'd be long out of date. -- Clifton -- Clifton Royston -- cliftonr@iandicomputing.com / cliftonr@volcano.org Custom programming, network design, systems and network consulting services
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e5978cc4910860e6fc86d11b6fdf7baa>