Clear linux buffer cache
// more info here
// http://www.linuxinsight.com/proc_sys_vm_drop_caches.html
// http://www.linuxinsight.com/proc_sys_vm_drop_caches.html
echo 3 > /proc/sys/vm/drop_caches
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
echo 3 > /proc/sys/vm/drop_caches
lookupd -flushcache
function edithosts { if [ -x "`which $EDITOR`" ] || [ -x "`which $1`" ] then if [ -x "`which $EDITOR`" ] then export TEMP_EDIT="`which $EDITOR`" else export TEMP_EDIT="`which $1`" fi echo "* Using ${TEMP_EDIT} as editor" $TEMP_EDIT /etc/hosts && echo "* Successfully edited /etc/hosts" lookupd -flushcache && echo "* Flushed local DNS cache" else echo "Usage: edithosts [editor]" echo "(The editor is optional, and defaults to \$EDITOR)" fi unset TEMP_EDIT }
lookupd -flushcache