Month: May 2009

Collaboration with screen

Log on another machine and become username you want to collaborate with: # su – david enter the pw Then you ssh into server the client is located on: # ssh [email protected] type yes then type your password Once you are there, you run: # screen -S foo Then you holler at David: “Hey David,…


Clear the terminal window

Try this: # cat /bin/cat Behold! Your terminal looks like garbage. Everything you type looks like you’re looking into the Matrix. What do you do? You type reset. But wait you say, typing reset is too close to typing reboot or shutdown. Your palms start to sweat—especially if you are doing this on a production…


Tree view from the command line

ls -R | grep “:$” | sed -e ‘s/:$//’ -e ‘s/[^-][^/]*//–/g’ -e ‘s/^/ /’ -e ‘s/-/|/’ #!/bin/sh ####################################################### # UNIX TREE # # Version: 2.3 # # File: ~/apps/tree/tree.sh # # By Dem Pilafian # # # # Displays Structure of Directory Hierarchy # # ————————————————- # # This tiny script uses “ls”, “grep”, and…


Linux Distribution Chooser

Which version of linux is best for you? Linux Distribution Chooser


How to Install Anything in Ubuntu Condensed

This is a very condensed excerpt of the excellent article that was posted in amitech.50webs.com ‘How to install ANYTHING in Ubuntu’. Search, install, remove available packages (preferred method) sudo aptitude search ABC sudo aptitude install ABC sudo aptitude remove ABC .deb (you have to take care of dependencies on your own) sudo dpkg -i ABC.deb…


Log Locations

General: cPanel/WHM Initial Installation Errors: Location : /var/log/cpanel*install* Description : These log files contain cPanel installation logs & should be referenced first for any issues resulting from new cPanel installations.. Cpanel/WHM Service Status Logs: Location : /var/log/chkservd.log Description :The service monitoring demon (chkservd) logs all service checks here. Failed service are represented with a [-]…


Gospel of Tux

Gospel of Tux Every generation has a mythology. Every millenium has a doomsday cult. Every legend gets the distortion knob wound up until the speaker melts. Archeologists at the University of Helsinki today uncovered what could be the earliest known writings from the Cult of Tux, a fanatical religious sect that flourished during the early…


Recover lost root password

1) Reboot your system. 2) When GRUB comes up type e . 3) Now select entry that begins with kernel. 4) Add then end of the kernel entry type either s or single, now hit enter. ‘kernel/ single’ make sure to add a space after kernel/ 5) Type b, the box will boot up and…


Clamscan

freshclam && clamscan -i -r –log=/root/clamscan.log /home/*/public_html & find /home/*/public_html -type f \( -name “*.cgi” -o -name “*.php” \) -print0 | xargs -0 egrep ‘(\/tmp\/cmdtemp|SnIpEr_SA|Bhl ynx|x2300|c99shell|r57shell|milw0rm|g00nshell|locus7|MyShell|PHP\ Shell|phpshell|PHPShell|PHPKonsole|Haxplorer|phpRemoteView|w4ck1ng|PHP-Proxy|Locus7s|ccteam)’ | cut -d ‘:’ -f1 | sort | uniq > shellcheck.txt && cat shellcheck.txt |mail -s “shellcheck from `hostname` on `date`” [email protected] & find /home/*/public_html -type f -print0…


send email @ reboot

crontab -e @reboot echo “Rebooted, now online” | Mail -s “`hostname` PAGE” [email protected]