How to flush DNS cache Linux, Mac OS X, Windows

[ad#Google Adsense-1]
To flush DNS cache on Microsoft Windows (Win Vista, Win 7)

Run hte command prompt with Administrator privileges

Type ipconfig /flushdns

To flush the DNS cache on Linux, restart the nscd daemon:-

Linux does not cache dns by default. Some systems might have a dns cahcing service such as nscd. Restarting the DNS caching service will flush the DNS cache.

To restart the nscd daemon, type /etc/rc.d/init.d/nscd restart in your terminal, on Ubuntu or Debian you need to use sudo service nscd instead

To flush the DNS cache in Mac OS X 10.6 Snow Leopard

type dscacheutil -flushcache in the Terminal

 

[ad#Google Adsense-1]

9 OS X Command Line Utilities you probably didn’t know about

OS X is ment to be a clean and a simple operating system,
yet under the hood it’s very powerful.

Here I shall go over 9, rather random, commands.
You can learn more about them by typing “man command-name” in the console.
Example, “man shutdown”.

Here we go!

1. shutdown
The command shutdown will shut down the system.

It must be run as root, by using the sudo prefix (which makes the command run as root)
Examples:
Reboot the computer
sudo shutdown -r now
Halt the computer (turn if off)
sudo shutdown -h now
Put the computer to sleep
sudo shutdown -s now
2. say
This tool uses the Speech Synthesis manager to convert input text to audible speech.

3. screencapture
The screencapture command can be used to capture a screenshot of the computer.
Example:
box:- petur$ screencapture screen.png
“Why on earth would you want to do that using the command line?”, you might ask. Because you can capture screenshots of remote computers, proven that you have root access to it via ssh.
It could also be useful in some situations to make a screenshot of a particular computer every x-minutes by combining ‘screencapture’ with the root crontab. Unfortunately crontab is, as I would say, an advanced topic and it will not be covered in this post.
4. arch
The arch command with no arguments, displays the machine’s architecture type.

The results can be read as follow:
i386 : 32-bit intel
x86_64 : 64-bit intel
ppc : 32-bit powerpc
ppc64 : 64-bit powerpc
5. top
The top CLI (Command Line Interface) equvalient of the Activity Monitor.


6. file
The file command is used to determine a file type.

Usage: file filename

7. iostat
iostat reports I/O statistics.
In other words, the load on your hard disk and the cpu.

Those numbers can be a little difficult to understand at first,
tps stands for Transfers per Second
KB/t stands for kilobytes per Transfer
MB/s stands for megabytes per second.

8. df
df stands for “display free”, as in display free disk space.
It’s one of those utilities you can’t be without!
-l filters out all non-local filesystems
-h makes the output more human friendly (Gi and Mi instead of plain Bytes)


9. vm_stat
Virtual memory Statistics
the hit rate is perhaps the most important information,
as a high rate indicates that you should add more RAM (memory) to your computer.


 
Please share your thoughts with me,
if you have any questions don’t hesitate to ask!