How clear DNS cache?

How do i clear the DNS cache on OpenSUSE? I tried “/usr/sbin/nscd restart” but that throws the error: “wrong number of arguments”. What should I do?

/etc/init.d/nscd restart

or

rcnscd restart

Hi
Your trying to used the daemon rather than the script… use;


sudo /etc/init.d/nscd restart


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 2 days 6:50, 2 users, load average: 0.17, 0.06, 0.08
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.82

Thanks, that did it!

or ’ service nscd restart ’

:wink:

Yes, that seems to have been added since SUSE 9 or 10 to make life easier for people used to RedHat based systems. I never liked it though. As usual, the SuSE people put more thought into their scheme at the beginning. You see, you can do, for example:

rcn<tab>

and get tab completion for that prefix, which you can’t with RH’s service. (Unless you configure bash’s completion for the service command, which is possible.)

Now that is handy! Listing services with ‘services -s’ would be the closest you could get to that, but it does not complete the service name for you.