Category O/S

Linux List Free Memory Pretty Output

Who doesn’t like pretty command output? resize; echo -ne ‘\n’;echo “===========================================”;ps -eo user,%cpu,%mem,rsz,args|sort -rnk4|awk ‘BEGIN {printf “%s\t%s\t%s\t%s\t%s\n”,”USER”,”%CPU”,”%MEM”,”RSZ”,”COMMAND”}{printf “%s\t%g’%’\t%g’%’\t%d MB\t%-10s\n”,$1,$2,$3,$4/1024,$5}’|head -n30;echo “===========================================”;echo -e “\n===========================================”;vmstat -s -S M|head -n10;echo “===========================================”; Sample output: Or to see output with pid resize; echo -ne ‘\n’;echo…

install java centos

How do I install java on centos? Step 1: download the JDK or JRE from Step 2: chmod +x Step 3: Execute Package Example: [root@interweb tmp]# wget [root@interweb tmp]# mv jre-6u25-linux-x64-rpm.bin\?e\=1305390057\&h\=b1bb96445e6d1965e1c566f5279a49f2 jre-6u25-linux-x64-rpm.bin [root@interweb tmp]# chmod +x jre-6u25-linux-x64-rpm.bin [root@interweb…

list all host headers iis

source: Option Explicit On Error Resume Next Dim objBaseNode, objChildNode Dim objBindings, intBindings Dim objFSO, objFile, strOutput ‘ get a base object Set objBaseNode = GetObject(“IIS://LOCALHOST/W3SVC”) Set objFSO = WScript.CreateObject(“Scripting.FileSystemObject”) Set objFile = objFSO.CreateTextFile(“HostHeaders.txt”) ‘ check if we have…

setup ssh cent-os

install the server and client # yum -y install openssh-server openssh-clients Start the service: # chkconfig sshd on # service sshd start Make sure port 22 is opened: # netstat -tulpn | grep :22 source:

mac os software update link modify

mac os software update link modify To reset the software update link to the default run this command: defaults delete CatalogURL Source: Also you can try this: Move the softwareupdate.plist file out of Library/Preferences to desktop…and run a…

picasa mac missing icons

Picasa mac missing icons This was pretty frustrating for me. I finally figured it out. You need to download georgia.TTF (just google it) and copy that to /Library/Fonts That’s it! Icons will re-appear! … stupid shitty Picasa!

update windows hosts file via .bat

This is how you update windows hosts file via .bat replace 127.0.0.1 localhost with the host entry you need @echo off REM Creating a Newline variable (the two blank lines are required!) set NLM=^ set NL=^^^%NLM%%NLM%^%NLM%%NLM% ECHO. >> “%systemroot%\system32\drivers\etc\hosts” findstr…

checkpoint vpn tunneling greyed out

checkpoint vpn tunneling greyed out Instructions on howto fix checkpoint vpn tunneling greyed out with checkpoint endpoint connect vpn client 1) Shutdown the R75 CPES Client 2) Stop the “Check Point Endpoint Security” service 3) Edit c:\program files (x86)\checkpoint\endpoint connect\trac.defaults…