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

1 thought on “Useful Commands

Leave a Comment