Posts

Showing posts from April, 2008

Search file in rpm shell script

Image
I am new to shell script. I was taught this script can search files with in rpm packages. It seem nature to me somehow. File name: searhrpm #!/bin/bash s=$1 shift for f in $* do if (rpm -qlp $f 2>/dev/null | grep $s) then echo RPM: $f fi done [root@rhel5 ~]# ./searchrpm "make" /misc/cd/Server/*.rpm

Copy Delivery Failure Notification Return Message Email Addresses

Image
Also, it was written last year. It was customize for a user who want to get all Delivery Failure email address. It may need a little bit modification to fit other situations but it may useful to demonstrate run a script in outlook. http://www.microsoft.com/technet/scriptcenter/csc/scripts/office/outlook/cscof068.mspx

Change IP Address HTA

Image
This HTA was written last year. http://www.microsoft.com/technet/scriptcenter/csc/scripts/network/client/cscne044.mspx Link http://cid-8167344592f7bd22.skydrive.live.com/self.aspx/Public/Change%20IP%20Address.HTA

Change the root password

Image
I am new to RedHat. Last week, I just know to change the root password in RH Linux is easier than window system. For Windows, you may need the ERD. For RH, just boot to single user mode. Method 1. Run init1 (but init must be superuser) Method 2. GRUB edit command line to run level 1 Method 3. Boot RH installation Disk and run linux rescue mode passwd

Large CSV File

Image
For large cvs file (for example system, application event log) may have difficulties while launch in excel. Here is a vbs script to cut the files to 60000 rows to prevent execl limitation of 65,536 rows - File not Loaded completely message. If you wish u can modify the rows of a file by "Line32: if (i = 60000) then", which can make the file smaller. Download by Link http://cid-8167344592f7bd22.skydrive.live.com/self.aspx/Public/Cutcsv.vbs

Simple HTA Clock

Image
A simple HTA Clock posted to MS last year. http://www.microsoft.com/technet/scriptcenter/csc/scripts/scripts/writing/cscst054.mspx Download Link http://cid-8167344592f7bd22.skydrive.live.com/self.aspx/Public/SimpleClock.hta

Display Setting of RHEL5 with vmware

Image
By default, After install RHEL5 in vmware, the display setting is 800*600. There is no other choice for the display setting. System > Administration > Display or #system-config-display In Hardware Type, Change Monitor Type to Generic CRT Display. Make some changes for example add a space and delete the space. Save the xorg.conf (Esc :wq) and reboot. vi /etc/X11/xorg.conf

Change Red Hat Virtual Console in VMware

Image
We can use Ctrl+Alt+F1-6 to change the Virtual Console text mode in Red Hat Linux. But VMware are using Ctrl+Alt as Hot Key by default. The simple way is to change the VMware HotKey preference. WMware Workstation, Edit, Preference, HotKeys

New Here

I have very limited RAM so I need to write down the tech stuffs and let me forget everything. Please correct me if there is any mistake.