[sf-lug] SFLUG.org ...

Rick Moen rick at linuxmafia.com
Sat Apr 13 12:52:40 PDT 2019


Quoting Ken Shaffer (kenshaffer80 at gmail.com):

> Rick,
> Another data point:
> Your posted xargs  version (cut and pasted) works fine on my system,
> Ubuntu 18.04, bash shell.

Thank you, Ken.  That's goood to hear, because I couldn't see any reason
why the incantations I posted _shouldn't_ work, and the one possibility I 
didn't take seriously is that my server's installed copy of /usr/bin/host
(or the user environment) has something funky about it that makes host
unable to process stdin input (and ditto with dig(1) ).  Eh, that's
peculiar but suggests that when I finally hurry up and migrate off my
antique Debian setup onto the new hardware and software, this weirdness
will likely go away.

I also note that it's copacetic when done on my laptop's Debian-unstable
virtual machine:

 
root at mini:~# for ns in  $(whois sf-lug.org | grep 'Name Server' | awk '{print $3'}') ; do host $ns;  done
NS1.LINUXMAFIA.COM has address 198.144.195.186
NS.PRIMATE.NET has address 198.144.194.12
NS.PRIMATE.NET has IPv6 address 2001:470:1f04:51a::2
NS1.SVLUG.ORG has address 64.62.190.98
NS1.SVLUG.ORG has IPv6 address 2600:3c01::f03c:91ff:fe96:e78e
NS1.SVLUG.ORG mail is handled by 10 mail.SVLUG.ORG.
NS1.SF-LUG.ORG has address 198.144.194.238
NS1.SF-LUG.ORG has IPv6 address 2001:470:1f04:19e::2
root at mini:~# 

On reflection, I prefer the for-loop version (over the xargs one).
xargs is overkill for this application, is substantially slower, and 
_has avoidable security risks_ (when processing trees of files that may
include files created by other users):

https://groups.google.com/forum/#!topic/alt.security/sIuDoPz0vyk
https://www.gnu.org/software/findutils/manual/html_node/find_html/Security-Considerations-for-xargs.html
http://www.zen19351.zen.co.uk/article_series/find_xargs_rm.html

xargs is cool, though.  ;->





More information about the sf-lug mailing list