DIG from file???

Stefan Puiu stefan.puiu at gmail.com
Sun Apr 23 20:46:22 UTC 2006

About bloating your log file, you might want to try using host, which
has more sparse output by default (or look into the dig options Kevin
pointed out). Most UNIX programs return a non-zero exit code after
terminating to signal whether an error was encountered when running
(which you can check by examining the $? environment variable in bash,
for example). The dig manual page doesn't mention anything about exit
codes, and at least my Windows dig binary doesn't seem to return
anything but 0 when run from my Cygwin bash. However, as far as I can
tell it works for host:

$ host www.linux.org
Using domain server:
www.linux.org has address

fane at stefan ~
$ echo $?

$ host www.linux
Using domain server:

Host www.linux not found: 3(NXDOMAIN)

fane at stefan ~
$ echo $?

Thus, you could ignore the output altogether and check only the exit code.


On 20 Apr 2006 12:06:26 -0700, Adisegna at gmail.com <Adisegna at gmail.com> wrote:
> The file out put is fine however, dig is also checking resolv.conf and
> bloating my log file with the ANSWER SECTION and ADDITIONAL SECTION.
> How do I prevent dig from looking in the resolv.conf file for this
> particular query?
> Thank in advance..

More information about the bind-users mailing list