Useful Commands

Parse out non-commented lines from a file:

grep '^[^#]' filename

How to test an Internet connection through a browser:

telnet google.com 80

Trying 64.233.167.99…
Connected to google.com (64.233.167.99).
Escape character is ‘^]’.

GET / HTTP/1.0

HTTP/1.0 200 OK

Check backporting:

rpm --changelog -ql packagename | grep CAN-xxxxx

Verify RPMs:

rpm -Va

Options:

  • S file Size differs
  • M Mode differs (includes permissions and file type)
  • 5 MD5 sum differs
  • D Device major/minor number mismatch
  • L readLink(2) path mismatch
  • U User ownership differs
  • G Group ownership differs
  • T mTime differs

Check the changelog on a rpm package:

rpm -q --changelog packagename

How to generate a SSH client key:

ssh-keygen -t rsa

How to sync the hardware clock with the current system time without rebooting:

hwclock --systohc





Please VOTE for this page at: ADD TO DEL.ICIO.US | ADD TO DIGG | ADD TO FURL | ADD TO NEWSVINE | ADD TO NETSCAPE | ADD TO REDDIT | ADD TO STUMBLEUPON | ADD TO TECHNORATI FAVORITES | ADD TO SQUIDOO | ADD TO WINDOWS LIVE | ADD TO YAHOO MYWEB | ADD TO ASK | ADD TO GOOGLE


1 Comment


  1. To get non-commented lines out of a file, you can also use:

    grep -v “^#” filename

    Posted March 27, 2007, 3:09 pm

Leave a reply