Red Hat Linux cheat sheet commands examples RHEL

Useful Linux Commands (Red Hat)

(http://www.cse.buffalo.edu/~eisner/DLW) Revised 3/1/2000

Getting information man commandname display the manual page for a particular command named commandname man -S sectionnumber commandname display the manual page under a specific section numbered sectionnumber for the command named commandname. Sometimes the same command will exist in more than one section. man alone will . . . → Read More: Red Hat Linux cheat sheet commands examples RHEL

How to Print a Windows Directory

Need to print a windows directory?

Here’s how: 1. Open up notepad 2. paste this text in

Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\printdir] @=”Print Directory” [HKEY_CLASSES_ROOT\Directory\shell\printdir\command] @=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,70,00,72,00,69,\ 00,6e,00,74,00,64,00,69,00,72,00,2e,00,62,00,61,00,74,00,20,00,22,00,25,00,\ 31,00,22,00,00,00

3. Save file as printdir.reg 4. Open up a new notepad window 5. paste this in:

@echo off dir %1 /-p /o:gn /S > “%temp%\Listing” start . . . → Read More: How to Print a Windows Directory

SELECT permission denied on object ‘USERS’, database ‘qcsiteadmin_db’, owner ‘dbo’

How to resolve this error:

[Mercury][SQLServer JDBC Driver][SQLServer]SELECT permission denied on object ‘USERS’, database ‘qcsiteadmin_db’, owner ‘dbo’.; Stack Trace: java.sql.SQLException: [Mercury][SQLServer JDBC Driver][SQLServer]SELECT permission denied on object ‘USERS’, database ‘qcsiteadmin_db’, owner ‘dbo’. at com.mercury.jdbc.base.BaseExceptions.createException(Unknown Source) at com.mercury.jdbc.base.BaseExceptions.getException(Unknown Source)

The reason this error is occurring is because user td does not have rights to the tables . . . → Read More: SELECT permission denied on object ‘USERS’, database ‘qcsiteadmin_db’, owner ‘dbo’

compare two files freeware

Howto: Compare two files using freeware or open source

Diffmerge is my favorite program (open source at least) that I use to compare files.

From their website:

DiffMerge is an application to visually compare and merge files for Windows, Mac OS X and Linux.

DiffMerge in Vault

DiffMerge was developed as the internal compare/merge tool . . . → Read More: compare two files freeware

Howto: See if a local port is listening from command prompt

List local/remote socket and PID  for all TCP connections in “Established” state:

netstat -ano | find /i “established”

List local/remote socket for all TCP connections in “Established” state (sometimes you get more than above):

netstat -an | find /i “established”

List connections over time (netstat_check_connections.bat):

@echo off for /L %%X in (1,1,4) do (netstat -b . . . → Read More: Howto: See if a local port is listening from command prompt

Howto: Back up Server 2003 Users Groups Shares Permissions Program Names Network Settings

I cam across two amazing article the other day detailing how to do some great stuff from the windows command line.

synjunkie knows his shit:

Command-Line-Ninjitsu Command-Line Kung Fu

I stumbled upon it because I was about to format a server but wanted to retain this information:

All local groups/users and their respective permissions for . . . → Read More: Howto: Back up Server 2003 Users Groups Shares Permissions Program Names Network Settings

Howto: Make Hudson HTTPS (Windows)

I am assuming you have installed hudson as a service in windows and that hudson lives in C:\hudson

Use a tool called Portecle to import your valid cert and export it as a java keystore file (.jks).  Remember to use THE SAME PASSWORD FOR ALL PROMPTS IN THAT PROGRAM (or you will run in to . . . → Read More: Howto: Make Hudson HTTPS (Windows)

Howto: Sync time with Active Directory Domain Controller

from command prompt run this:

w32tm /resync sync time domain controller

Howto: Migrate IIS Sites to Another Server

First you need to install the  IIS 6.0 Migration Tool

For each Web site and virtual directory on the source server, you must create a corresponding Web site and virtual directory on the target server. Later in the migration process, you will copy the content into these Web sites and virtual directories. Create the Web . . . → Read More: Howto: Migrate IIS Sites to Another Server