Newsletter: Credit repair organization act Interest only home equity loan Best consolidation loan student Credit card debt elimination Bank of america credit card services Credit repair yourself Union plus credit card Countrywide home loan customer service Credit card counseling services Credit card uk high risk Free payday loan Business card credit prepaid Trans union credit report agency No security deposit credit card Student loan for people with bad credit Bad credit gas card Texas construction home loan Canada consolidation debt loan loan student Canada payday loan online Second debt consolidation mortgage Credit repair form Bad credit equity loan Bad credit score Quick personal loan Free credit score online Credit card merchant account Credit rating uk Apply for capital one credit card Greendot prepaid credit card Direct merchant credit card bank na Guaranteed business credit card Letter to credit card company Calculator consolidation debt loan student Citibank student loan 1000 cash loan payday advance Christian consolidation debt services Shell gasoline credit card Card college credit debt in student Excessive credit card debt Maryland home improvement loan Loan nz personal Mortgage broker home loan refinance Bad credit payday loan Well fargo home equity loan Low interest rate credit card Credit free report state Guaranteed loan personal unsecured Self help credit repair Chase credit card and circuit city Credit repair information Card consolidate credit loan student Credit equifax from report Card compare credit from offer visa Michigan debt consolidation loan Credit card for people with no credit history Mortgage calculator home loan refinance Offshore credit card processing Online credit card processing service Credit repair law Unsecured personal loan with poor credit Phone credit card processing Cash loan payday Gasoline company credit card Arizona bad car credit loan Consumer report credit card Credit card terminal Instant payday loan Maryland debt consolidation Consumer coop credit union Card credit number online Credit repair agency Credit counseling seattle Credit experian report score Debt consolidation Countrywide equity home loan Equity florida home loan refinancing Advance bad cash credit loan Used credit card machine 0 apr card credit transfer Bakersfield california home loan Guaranteed no fax payday loan California home loan mortgage refinance Trans union credit report rating Qualify fha home loan Second mortgage versus home equity loan Washington mutual home loan center Guaranteed bad credit personal loan Ten dollar payday loan Credit card debt consolodation Advance cash loan payday software Bad credit loan mortgage refinancing Wal mart credit card canada Check credit score Bad credit government home loan Bad credit home improvement loan No teletrack check payday loan Report credit card fraud Free annual credit report government Credit repair services Loan payday quick Us bank credit card Manufactured home refinance loan Card credit payment process Best credit card for bad credit 0 percent apr credit card Home home improvement loan rate California home mortgage loan rate Credit card reward program Card counseling credit service Debt consolidation mortgage loan Bad credit personal signature loan Personal loan Credit card rate uk Instant bad credit loan Aspire credit card customer service Card credit hsbc nv Online debt consolidation 1000 advance loan payday Credit counseling services of alberta Card consolidation credit debt help Credit free jersey new report Private lender for personal loan Chase credit card customer service Government loan for first time home buyer First consumer debt consolidation Online credit card payment California home loan services Bad consolidation credit debt mortgage Home owner loan corporation Bad credit mortgage financing First horizon home loan Direct merchant bank credit card application Prepaid virtual credit card Bad credit credit card Instant credit card Payday loan application Credit card debt help Delaware debt consolidation Best debt consolidation loan Guaranteed loan personal Business card credit start up California home loan refinance Credit repair program Home loan owner personal secured Best card credit low rate Company credit card policy Card consolidation credit debt online South carolina bad credit mortgage Home loan mortgage refinance Bad credit loan mortgage Increase credit score Mortgage application bad credit Brunswick home loan new Free credit repair help Home equity loan interest rate Capital one student credit card Credit card for online shop Free credit report online free Student loan consolidation center Card credit offer unsecured Current home loan interest rate One hour payday loan Consumer credit law California christian debt consolidation Consolidation debt mortgage uk Best card consolidation credit deal Beneficial personal loan Free online credit card processing Country wide home loan Card credit fixed low rate Home equity loan lowest rate Card credit mbna payment Bad credit loan mortgage need 0 balance card credit student transfer Cheap payday loan Card credit online payment After bankruptcy home loan New hampshire home equity loan Alternative student loan for bad credit Guaranteed instant loan personal unsecured Bad card credit debt uk Instant credit repair Capital one credit card services Unsecured visa card bad credit Bad credit mortgage wisconsin Nevada bad credit mortgage 1st financial bank usa credit card Free credit card debt consolidation Home loan albany new york Card consolidation counseling credit debt Annual free credit report and score Low cost payday loan Construction financing home loan new Free credit counseling Credit information report Chase credit card offer Instant business credit card Credit counseling detroit Unsecured personal loan Refinance home equity loan Royal bank of scotland credit card Consolidations loan student Free bad credit personal loan Household credit card Free credit report credit card Guaranteed online personal loan Card chase credit disney visa Building business credit Check credit free report Auto bad bankruptcy credit loan Compare credit card reward Consolidation direct federal loan student Mortgage vs home equity loan Guaranteed personal loan Capital one credit card login Bad consolidation credit debt mortgage Best california equity home loan California equity home loan rate Credit card for people with bad Small business credit card processing Card card credit jc master penney reward Bad credit guaranteed home loan Bad debt consolidation loan Bad credit car loan new york Equifax credit rating Card counseling credit debt services Uk unsecured personal loan Apply bad canada card credit credit in Florida mortgage loan debt consolidation Sallie mae student loan services Bad credit high limit credit card Credit card free balance transfer Compare home loan mortgage new quote Credit counseling ontario Great lake loan student Credit repair guide American express small business credit card Well fargo secured credit card Business card compare credit offer small Fraud credit card company Free credit card processing Alaska home improvement loan National foundation for consumer credit Bad credit personal auto loan Good credit rating score Consolidation loan rate student Credit score interest rate Internet credit card fraud Credit repair software Household bank credit card Card credit machine nurit wireless Non profit debt consolidation loan Bad credit lender No limit credit card Credit score canada No credit check business loan Center loan national service student Credit card cash back offer Bryant card credit lane payment Card consolidation credit debt loan New york debt consolidation loan Bad bankruptcy credit home loan Lexington law credit repair Low interest business credit card Credit free massachusetts report Countrywide home loan servicing Secured credit card company Bad credit home loan va Providian visa credit card Business card consolidation credit debt California free credit report Bank federal home indianapolis loan Mbna secured credit card Consumer credit counseling of maryland Credit free report score Christian counseling credit family Credit card merchant online Carolina corporation loan south student Bad credit car loan canada No credit card needed Secret credit report repair Christian consolidation counseling credit debt Government debt consolidation Consolidation debt information Best rated credit card Fixed home equity loan American express credit card offer Bad credit home mortgage refinance Find best credit card rate Corp loan sc student Consolidation consumer credit Loan for non home owner Consolidation credit debt loan Consolidation debt loan online uk Credit counseling Annual credit report trans union Compare credit card company After bankruptcy equity home loan Bad card credit credit visa Balance card credit transfer uk Loan national student Instant credit card processing Faxless loan payday quick Business credit financing small Credit free online report totally Business accept credit card Bad credit home loan mortgage services Credit card consolidation best deal Credit score Best student credit card Bankruptcy credit repair Chase visa credit card Consumer counseling credit debt management Unsecured personal loan bank Cfs loan student Citibank credit card offer Business card credit gm Consolidation loan debt loan Fha va home loan Calculator loan student Texas va home loan Bad card credit master visa 0 interest credit card application Bank one credit card Federal home loan bank rate Accredited card credit secured Free lesbian porn no credit card No credit card web cam Capital one personal loan Credit card machine merchant account Equity home interest loan only Sunoco gas credit card Bank card credit secured us Credit card fraud protection Credit repair letter Card company consolidation credit Guaranteed payday loan 1000 loan payday Canada credit free online report Federal stafford student loan Cash back credit card application Instant payday loan completely online Online va home loan Corporation finance loan student Bad credit down home loan money no Texas credit repair Fixed rate home loan Bad card credit credit credit no Free credit repair Top debt consolidation loan Free music no credit card Bad credit credit card guaranteed approval where Calculator card credit payment Bank federal finance home loan office Credit card deal uk Free phone no credit card required Sears credit card canada Bad credit personal loan lender Article credit card debt Card credit fixed interest low rate Home improvement grants loan Credit credit free report score Credit line report Consolidation loan student travel Consolidation credit Personal finance loan Bad bankruptcy credit loan mortgage Consumer credit counseling agency Credit card debt management uk 3 bureau credit online report Card credit interest low rate Secured credit card Online gambling credit card Credit card balance transfer offer Consolidation debt defaulted loan student Shell credit card account Capital card com credit one Citibank student loan consolidation Bad credit mortgage virginia Credit card terminal repair Credit free ny report Juniper bank credit card Canadian credit report Apply for a business credit card Christian credit card counseling Georgia home improvement loan Loan for people with bad credit Instant credit card number Cell phone no credit card required Equity home loan mortgage refinance No credit check unsecured credit card Guaranteed credit card for bad credit Credit report trw experian Bad credit mortgage canada Accept credit card hardware Home equity loan orange county california Copy credit free report Credit card balance transfer uk Card chase commercial credit Business card company credit small Credit card debt management Consolidate credit card bill Business gas credit card Personal debt consolidation loan Free debt consolidation help Rid of credit card debt Online credit card service Personal credit report Federal government free credit report Company consolidation loan student Payday loan no faxing required Bad credit financing Chase credit card online banking Delaware debt consolidation loan Home loan for people with bad credit Payday advance loan illinois Credit debt help Hsbc credit card payment Citi financial credit card Com credit free report Chase credit card home Bad card credit gas people Buyer first home loan time How to read an experian credit report Card credit payment Government student loan consolidation Student loan debt consolidation calculator First horizon home loan corp Mobile credit card processing Free porn video no credit card needed Home loan mortgage refinance mortgage Free experian credit score Credit report help Providian credit card services Continental airline credit card Federal direct student loan program 3rd party credit card processing Credit government report Bad credit debt consolidation mortgage Free annual credit report law Fha home improvement loan Stop credit card offer Free debt consolidation company First time mortgage bad credit Debt management consolidation credit card Card credit unsecured visa Best home loan rate High school student credit card Bad credit home loan mortgage wisconsin Bank home equity loan rate North carolina debt consolidation Loan for bad credit rating Credit and debit card processing Federal home loan bank Clean credit report up Advance cash fast loan payday Wamu home loan Debt consolidation mortgage Credit card processing without a merchant account Guaranteed loan student texas Bad balance card credit credit transfer Free credit repair letter Bad credit fix Hawaiian airline credit card American express credit card company Free credit rating score Bad credit home mortgage lender Do it yourself credit repair kit Bad credit 2nd mortgage refinance Online credit card services Interest free credit card Moodys credit rating Gas credit card for bad credit Online instantly credit report free Credit card merchant Buy prepaid credit card Bad credit new car loan Citi credit card Government debt consolidation loan Michigan home equity loan Bad credit student personal loan Home equity loan tennessee Card chase credit na Credit report score Loan student subsidized Free credit bureau report Card college credit offer student Commerce bank credit card Free credit report and free credit score Babyphat prepaid credit card Free sex web cam with no credit card Citibank credit card login Business loan poor credit Debt management consolidation credit card 0 fixed apr credit card Credit score calculator Poor credit home improvement loan Advice consolidation loan student Free credit report check score online Debt consolidation defaulted student loan Low interest rate student credit card Cic credit report Bad credit loan credit card Consolidate government loan student Credit counseling of america Consolidate private student loan Mortgage with bad credit chicago Credit card processing low rate Credit card terminal system Accept business card credit small Credit equifax report Alternative loan student Debt consolidation counseling services Bad credit easy personnel loan Debt consolidation loan for home owner Uk credit card Bad college credit loan student Missouri payday loan Bad business card credit credit Loan mae salli student Cell phone no credit card Wachovia secured credit card Free credit report with 3 score Payday loan oregon Copy credit free instant report Bad credit loan uk Free download porn no credit card Home loan equity mortgage rate Buyer california first home loan time Partially secured credit card Tesco personal loan Bad credit houston mortgage texas Alberta loan student Consolidation credit debt repair Alaska airline credit card Free instant credit score Debt consolidation credit counseling Business credit card with no personal guarantee Direct loan student Free online debt consolidation Air card credit mile uk Best refinance home mortgage loan rate Online credit card processing Credit repair mortgage Compare business credit card Canada consolidation debt free Highest credit score Card credit credit free report without 125 home equity loan Bad construction credit home loan Best travel reward credit card Student loan consolidation rule Experian credit report bureau Consolidation debt free non profit Bad credit loan online personal Apply card credit egg uk Personal loan unsecured loan Best consolidation loan rate student Credit repair report service Completely credit free report Apply card credit virgin Secured debt consolidation Mortgage loan refinance and debt consolidation How to get a business credit card Credit history report online Auto bad credit loan military Consolidation debt loan personal unsecured Card credit payment processing Consolidation debt link suggest Card credit interest low uk Debt consolidation service uk Payday loan cash advance loan Prepaid credit card deal Canyon card christy credit free no video Consumer credit services Maryland debt consolidation loan Bad credit history credit card Credit report service Lower credit card debt Loan pay payday quick Credit free line report Home equity loan massachusetts Loan private student Credit equifax free report score Self credit repair 3bureau online credit report Credit debt management Bad card credit credit get unsecured Auto bad bankruptcy credit credit loan no Credit card counseling Merchant credit card processing 0 balance card credit life transfer American express black credit card Annual credit equifax report Instant approval credit card application

Linux technical support, Technical Blogs, Cheap dedicated server support, Cheap linux dedicated server support, Cheap windows dedicated server, Dedicated server support, Data center Operation, System Administration, Bash and perl scripts for server maintainance

Setup Linux VPN server

I am assuming you are using a Redhat or Redhat-like distribution. Some of these packages can be grabbed via yum. However, I’m going to have you install them via RPM as you cannot get all of them via yum. If you are not, you will need to get the proper packages. For Debian you can use aptget or search for the .deb. For SuSe you can use Yast or find the distro specific RPMs.

1) Install the DKMS package

rpm –install dkms-1.12-2.noarch.rpm

http://prdownloads.sourceforge.net/…12-2.noarch.rpm

This is dynamic kernel module support. You need this to simplify setup and configuration at the kernel level. This will make almost everything transparent to the user during setup.

2) Install the ppp kernel module

rpm –install kernel_ppp_mppe-0.0.4-2dkms.noarch.rpm

http://prdownloads.sourceforge.net/…dkms.noarch.rpm

Point to Point Protocol to setup your “modem” or whatever your connection consists of. This is the portion for your kernel.

3) Make sure ppp is working

modprobe ppp-compress-18 && echo James Garvin has saved me from a life of Windows

Ok, so that is a bit of fun, but what does that command mean? Well, if on success of the modprobe command, I execute the echo command. Modprobe adds the module to the Linux kernel, while echo simply writes what ever you say back to the terminal.

4) Upgrade ppp

rpm –upgrade ppp-2.4.3-0.cvs_20040527.4.fc2.i386.rpm

http://prdownloads.sourceforge.net/….4.fc2.i386.rpm

This is the ppp for the user. The kernel module for ppp has been installed and this is for the user.

5) Get the PPTP client

rpm –install pptp-linux-1.5.0-1.i386.rpm

http://prdownloads.sourceforge.net/….5.0-1.i386.rpm

This is the “VPN Client,” so to speak. This is the GUI client in which you can setup VPN connections and various options.

6) Get phppcntl

rpm –install Getphp-pcntl php-pcntl-4.3.8-1.i386.rpm

http://prdownloads.sourceforge.net/….3.8-1.i386.rpm

This is to help the GUI work.

7) Get the phpgtkmodule

rpm –install php-gtk-pcntl-1.0.0-2.i386.rpm

http://prdownloads.sourceforge.net/….0.0-2.i386.rpm

This file also helps make the GUI work.

8) Get pptpconfig installed

rpm –install pptpconfig-20040722-0.noarch.rpm

http://prdownloads.sourceforge.net/…22-0.noarch.rpm

This command installs the Point to Point Tunneling Protocol. This is so the VPN can actually create the tunnel from A to B. VPNs can use two protocols, L2TP and PPTP. L2TP is Layer 2 Tunneling Protocol and does just what it says. It works at Layer 2 in the OSI model, the Data Link Layer.

9) Now at the command line type

pptpconfig

This command will popup a spiffy GUI for you to use.

10) Configure your connection

In the Server Tab we need to configure some basics:

|> Name: The name of the connection. You can call it anything you want
|> Server: The server you are connecting to, either the IP or name of the server. eg: 64.233.187.99 or google.com
|> Domain: A domain, if any, that the VPN is connecting to
|> Username: Your login username for the VPN or the intranet
|> Password: The login password for the VPN or the intranet

In the Routing Tab we need to make sure it is setup properly. Typically we need to send All to Tunnel.However, this can and will vary from VPN to VPN. Check with you local administrator on what radio button you need to choose.

The DNS Tab is usually quite simple; it will be either automatic, or we will have to enter some basic DNS information and any optionswe may need to include.

The Encryption Tab is a sticky point. We have a number of choices:

|> Require Microsoft PointtoPoint Encryption
|> Refuse 40bit Encryption
|> Refuse 128bit Encryption
|> Refuse Stateless Encryption
|> Refuse to Authenticate with EAP

You need to talk to your administrator and understand what your VPN requires. A typical setup will check box Require Microsoft PointtoPoint Encryption (for MS VPNS), Refuse 40bit Encryption, and Refuse Stateless Encryption. However, talk to your administrator to be sure.

The Miscellaneous Tab is our final tab. We shouldn’t have anything to do here. The default setup should work just fine in many cases.

We now click the Addbutton and highlight our new connection and choose Start. We have now created a VPN connection to a remote host! Congratulations for using Linux and sticking with a slightly frustrating task.

Install IE (Internet Explorer) On linux

IEs4Linux is a small shell script that can be run via console on any Linux machine with Wine installed. As the title suggests, it allows you to quickly and easily install that most infamous of Microsoft products: Internet Explorer.

The creator of IEs4Linux is Sérgio Luís Lopes Júnior, a 21 year old Brazilian student and self-proclaimed lover of Linux and OpenSource. Naturally, being open source, IEs4Linux is free. However, as with many people working on open source projects, Sérgio’s funding comes from the community; if you found IEs4Linux helpful, you can PayPal him a few dollars to continue development of the project.

IEs4Linux relies on the Wine project to supply an implementation of the Microsoft Windows API. The IEs4Linux script actually downloads the required CAB files directly from the Microsoft site; then, using cabextract, copies the files to a new Wine profile. This way, your existing Wine profiles are not affected, and any other software you have running will be just fine. In addition to installing Internet Explorer versions 5, 5.5, and 6, IEs4Linux also can install Flash 9 for you from Adobe.

IEs4Linux is a GPL product; however, Internet Explorer is a copyrighted product of Microsoft. This means that you will need to be in possession of a valid Windows license version greater than 95, although it will not be asked for during the installation process.

For the installation, you’ll need to be running the latest version of Ubuntu as your Linux distribution. IEs4Linux will work with almost every distribution, but the installation routine varies. This article assumes that you already have Ubuntu Desktop installed and operational.

Depending on how you like to install your software, I have included two sets of instructions, first the graphical (GUI) method and lastly the console (CLI) method.

Installing the required packages

To install all the applications required to enable IEs4Linux to run properly, ensure that you have the Universe repositories enabled. Open the Software Sources configuration screen, which can be found under Toolbar -> System -> Administration -> Software Sources.

Next, you need to select all the repositories for the CD-ROM/DVD option. You won’t need this option. The online repositories are kept up-to-date. Press the Close button when you’re finished.

Now it’s time to begin installation of the required packages. Go to Toolbar -> System -> Administration -> Synaptic Package Manager. Once it opens, search for Wine and cabextract. Once you find them, press Apply.

Bring in the console

You can also obtain the files from the console prompt. To begin, open a console. You can do this by going to the toolbar and going to Application -> Accessories -> Terminal. In the terminal, run the command: apt-get update && apt-get install cabextract wine. The install process will begin after pressing [Enter]. The apt-get process download installs all the files and packages for wine for you.

Getting down to business

Now that you have Wine installed with cabextract, it’s time to download the IEs4Linux files. You can either go to the IEs4Linux Web site, or return to a console to enter this command to download the latest IEs4Linux build:

Code:

wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz

Downloading the IEs4Linux Installer.

After you have downloaded the latest build tarball, you need to cd to the directory where you downloaded tarball to if you did not do so from the console. This can be done easily with the command cd ies4linux-*. Next, enter the command tar xzvf ies4linux-latest.tar.gz in the console to decompress the tarball and change directories into the build directory. Finally, to launch the IEs4Linux script that will begin the installation process, type ./ies4linux.

You will be lead through a text-based series of screens that will ask you questions about what versions of Internet Explorer you want to install, as shown in Figure D. The first question asked will be if you wish to install version 5 and 5.5 of Internet Explorer; you can make that decision for yourself. In addition to installing Internet Explorer, IEs4Linux will also install the Flash Player plug-in automatically.

After a few minutes, the script will download all of the required files and install them on your computer automatically. Additionally, links on your desktop will be created to Internet Explorer making for quick access. The Internet Explorer launch binaries will exist in the newly created directory bin in your home directory. For quick access on command line, run ~/bin/ie6 to launch Internet Explorer version 6. You’ll see IE run.

Congratulations; you have successfully installed Internet Explorer version 5, 5.5, and 6 on your PC. With the assistance of IEs4Linux, it is possible to have Internet Explorer accessible to you as a tool on any Linux system that can run Wine.

Variations in other distributions

The install process for other distributions will be different according to that distro’s package system. But the rest is the same after that. For example, in Gentoo, the series of commands would be:

Code:

emerge –sync && emerge wine cabextract.

For Fedora, the commands to install wine and cabextract are:
Code:

yum -y install wine* yum -y install cabextract

For Mandriva, the directions are:
Code:

urpmi wine cabextract

For more distributions and instructions, please visit the IEs4Linux site.

Known Issues

There are a number of known issues with the Internet Explorer version installed by IEs4Linux. Some of these include:

* VML does not work.
* PNG transparency does not work even when using hacks (a consequence of the “CSS filter” bug).
* Windows Update does not work.
* JavaScript error dialog does not open.
* Modified toolbars are not saved.
* ActiveX may not work with some special cases.

The install of Internet Explorer made by IEs4Linux doesn’t have the JavaScript debugging enabled by default, which can be quite frustrating when you know there is a bug on the page, but can’t get the error message. To get around this, you will need to enable JavaScript debugging.

In the menu bar, go to Tools -> Internet Options to open the Internet Options dialog. Next, press on the Advanced tab and scroll down to the Browsing section. Uncheck the list item Disable Script Debugging.

Perl + regular expression and pattern matching

Pattern Matching and Regular Expressions

If you were paying attention, you noticed a huge loophole in the programs above: there’s nothing to prevent you from typing in a string variable when you’re supposed to be typing in a number. You can type in “dog” and “cat”, and the program will try to add “dog” and “cat” (which, if you’re curious, gives a result of zero.) You need some way to check to make sure that the person actually typed in numbers; then, if they didn’t, you can ask them again (with a looping control structure), until they get it right.

Welcome to the concepts of pattern matching and regular expressions, two of Perl’s powerful text-processing tools. Let’s start with a simple pattern first: one letter. If you want to test a variable to see if it contains the (lower-case) letter “z”, use this syntax:

if ($x =~ /z/) {
print “$x has a z in it!\n”;
}

Let’s take that apart: if is just like while, except it only checks once (that is, it won’t loop around again and again.) Like while, it will execute every command inside the curly brackets if the statement inside the parentheses is true.

The statement inside the parentheses works like this: =~ makes a comparison between $x and whatever’s inbetween the two slashes; in this case, if there’s a z anywhere inside $x, then the statement is true.

Let’s up the ante, and match only if $x begins with the letter z:

if ($x =~ /^z/) {
print “$x begins with a z!\n”;
}

^z is a regular expression; the carat (^) stands for the beginning of the string. Thus, the matching statement has to find a z immediately following the beginning of the string in order to be true.

How about words that begin with z and end with e? Use the regexp

/^z.*e$/

The $ stands for the end of the string; the period stands for “any character whatsoever”; combined with the asterisk, it means “zero or more characters.” Without the asterisk,

/^z.e$/

would mean “z followed by one character followed by e.”

There’s a lot of different regular expressions. For instance,

/^z.+e$/

means “z followed by at least one character, followed by e.”

/^z\w*e$/

means “z followed by zero or more word characters followed by e”–that is, “z!e” wouldn’t match.

So to make sure that somebody’s typing in numbers in our adding program, and not words, make the subroutine getnumber look like this:

sub getnumber {
$number = “blah”;
while($number =~ /\D/){
print “Enter a number “;
$number = <>;
chop($number);
}
$number;
}

“\D” is the regular expression for non-digits; if any character in $number is not 0-9, the expression won’t match, and you’ll get asked to enter a number again.

Note how we had to set $number to include a non-digit ($number = “blah”) to get inside the loop the first time around.

find files and replace word in it using script

1. find /path/to/start/from/ -type f | xargs perl -pi -e ’s/applicationX/applicationY/g’

2. find . -type f -name ‘*.txt’ -print | while read i
do
sed ’s|applicationx|applicationy|g’ $i > $i.tmp && mv $i.tmp $i
done

3. find . -type f -print0 | xargs -0 sed -i ’s/Application/whatever/g’

4. To replace all instances of a string in a directory (subdirectories included) do:
Code:
perl -e “s/FIND/REPLACE/g;” -pi.save $(find path/to/DIRECTORY -type f)

The above will make a backup temp file of your original
If you do not want a temp file with the .save extension then do:
Code:
perl -e “s/FIND/REPLACE/g;” -pi $(find path/to/DIRECTORY -type f)

To search just files of type, .htm without a backup file in the current directory only (no subdirectories) you could use:

Code:
perl -pi -e ’s/design/dezine/g’ *.htm

5. Bash script : -

#!/bin/sh
echo enter file name with extension
read NAME
echo enter word to replace
read FIND
echo enter word that replaces
read REPLACE
for file in $(grep -il “$FIND” $NAME)
do
sed -e “s/$FIND/$REPLACE/ig” $file > /tmp/tempfile.tmp
mv /tmp/tempfile.tmp $file
done

Command and system information on different UNIX flavors (Solaris 8, HP-UX 10.x 11.x, FreeBSD, Linux, AIX)

Miscellaneous


System Administration Tools

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
/usr/ucb/whoami

/usr/bin/whoami

/usr/bin/whoami /usr/bin/whoami
/usr/bin/dos2unix /usr/bin/dos2ux cd /usr/ports/converters/unix2dos
/usr/bin/eject /usr/bin/tcio -r

/usr/bin/fdformat

/usr/bin/mediainit -f /usr/sbin/fdformat /usr/bin/fdformat
/usr/bin/makedev /usr/sbin/mknod /sbin/mknod /bin/mknod
/usr/bin/mpstat /opt/perf/bin/glance,

/opt/perf/bin/gpm
/usr/bin/pagesize /opt/perf/bin/glance,

/opt/perf/bin/gpm
/usr/bin/pagesize
/usr/bin/setfacl

/usr/bin/chacl

/usr/bin/showrev /usr/bin/uname -a

/usr/bin/tip

/usr/bin/cu
/usr/bin/unix2dos /usr/bin/ux2dos
/usr/sbin/add_drv /usr/sbin/mknod,

/usr/sbin/insf,

/usr/sbin/mksf
/usr/sbin/cfgadm

/usr/sbin/ioscan

/usr/sbin/devfsadm /usr/sbin/mknod,

/usr/sbin/insf,

/usr/sbin/mksf
/usr/sbin/dhcpconfig

/sbin/auto_parms

/usr/sbin/dhtadm /usr/sbin/dhcptools

/usr/sbin/disks

/usr/sbin/mknod,

/usr/sbin/insf,

/usr/sbin/mksf
/usr/sbin/fdisk /usr/sbin/lvlnboot,

/usr/sbin/lvcreate
/usr/sbin/growfs /usr/sbin/extendfs,

/usr/sbin/fsadm,

/usr/sbin/lvextend
/usr/sbin/installboot /usr/sbin/lvlnboot
/usr/sbin/metaparam

/usr/sbin/lvchange,

/usr/sbin/vgchange

/usr/sbin/metastat

/usr/sbin/lvdisplay,

/usr/sbin/pvdisplay,

/usr/sbin/vgdisplay
/usr/sbin/metasync /usr/sbin/lvsync,

/usr/sbin/vgsyncr
/usr/sbin/nslookup

/usr/bin/nslookup

/usr/sbin/nslookup /usr/bin/nslookup
/usr/sbin/poweroff /usr/sbin/shutdown /sbin/shutdown -h now shutdown -h now

/usr/sbin/prtconf

/usr/bin/getconf
/usr/sbin/prtconf | grep -i memory /usr/sbin/swapinfo
/usr/sbin/rem_drv /usr/sbin/rmsf
/usr/sbin/strace /usr/bin/strace /usr/bin/strace [!]
/usr/sbin/strclean

/usr/bin/strclean

/usr/sbin/strerr /usr/bin/strerr

/usr/sbin/sysdef

/usr/sbin/ioscan,

/usr/sbin/sysdef
lsdev
/usr/sbin/tapes

/usr/sbin/mknod,

/usr/sbin/insf,

/usr/sbin/mksf

/usr/ucb/fasthalt /usr/sbin/reboot -q,

/usr/sbin/shutdown

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
/usr/bin/admintool /usr/sbin/sam /stand/sysinstall /bin/linuxconf /usr/bin/smit (GUI),

/usr/bin/smitty

Disk Space and Information

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX

/usr/sbin/df

/usr/bin/df /bin/df /bin/df /usr/bin/df
/usr/sbin/df -k /usr/bin/bdf /bin/df /bin/df /usr/bin/df -k
/usr/sbin/mount,

umount
/sbin/mount,

umount
/sbin/mount,

umount

/bin/mount,

umount

/sbin/mount,

umount
/usr/sbin/devinfo /usr/sbin/diskinfo

/dev/rdsk/device_file
Kernel Configuration

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
/etc/system /stand/system /usr/src/sys /usr/src/linux chdev -l sys0 -a
Processes

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
/usr/bin/ps -ef /usr/bin/ps -ef /bin/ps -axj /bin/ps -ef
/bin/truss tusc /usr/bin/truss /usr/bin/strace syscalls
/usr/bin/iostat /usr/bin/iostat /usr/sbin/iostat /usr/bin/iostat
/usr/ucb/users /usr/bin/users /usr/bin/users /usr/bin/users /usr/bin/users
/usr/bin/prstat /usr/bin/top /usr/bin/top /usr/bin/top /usr/bin/top
Physical Memory

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
/usr/sbin/dmesg | grep mem

/usr/sbin/prtconf | grep Memory

/etc/dmesg | grep -i phys /sbin/dmesg | grep “real mem” grep MemTotal /proc/meminfo bootinfo -r
Hardware Status/Information

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
dmesg dmesg dmesg dmesg errpt -a
/usr/bin/arch -k /usr/bin/model /bin/arch /usr/bin/uname -m /usr/bin/uname -m
“Unique” ID

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
/usr/sbin/dmesg | grep Ether /usr/sbin/lanscan
/usr/bin/hostid /usr/sbin/lanscan,

/usr/bin/uname -i
/usr/bin/hostid /usr/sbin/hostid
Swap

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
/usr/sbin/swap -a /usr/sbin/swapon -a /sbin/swapon -a /sbin/swapon -a swapon -a
/usr/sbin/swap -l /usr/sbin/swapinfo /usr/sbin/swapinfo /usr/bin/free lsps -a
vmstat vmstat vmstat vmstat vmstat
System Files

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
/etc/rc#.d /sbin/rc#.d /etc/rc* /etc/rc#.d/
/etc/rc#.d /sbin/init.d /etc/init.d/
/etc/vfstab /etc/fstab /etc/fstab /etc/fstab /etc/filesystems
/etc/inet/hosts /etc/hosts /etc/hosts /etc/hosts
/etc/shadow /etc/passwd /etc/master.passwd /etc/shadow /etc/security/passwd

/etc/group

/etc/group,

/etc/logingroup
/etc/group /etc/group

/etc/format.dat

/etc/disktab /etc/disktab
The X Window System

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux
/usr/openwin/bin/xterm /usr/bin/X11/xterm /usr/X11R6/bin/xterm /usr/X11R6/bin/xterm
/usr/openwin/bin/xhost /usr/bin/X11/xhost /usr/X11R6/bin/xhost /usr/X11R6/bin/xhost
Hostname

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux
/usr/bin/hostname /usr/bin/hostname /bin/hostname /bin/hostname
/etc/inet/hosts /etc/hosts /etc/hosts /etc/hosts
/usr/bin/uname -a /usr/bin/uname -ae /usr/bin/uname -a /bin/uname -a
Networking

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
/usr/sbin/showmount /usr/sbin/showmount /usr/bin/showmount /sbin/showmount /usr/bin/showmount
/etc/dfs/dfstab /etc/exports /etc/exports /etc/exports /etc/exports
/usr/sbin/share /usr/sbin/exportfss
/usr/lib/netsvc/yp/ypbind /usr/lib/netsvc/yp/ypbind /usr/sbin/ypbind
/usr/sbin/route /usr/sbin/route /sbin/route /sbin/route /usr/sbin/route
/usr/sbin/in.routed /usr/sbin/gated /sbin/routed /usr/sbin/gated
/usr/bin/netstat /usr/bin/netstat /bin/netstat /usr/bin/netstat /usr/sbin/netstat
/usr/bin/rsh /usr/bin/remsh /usr/bin/rsh /usr/bin/rsh
Tape Copies

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux
/usr/bin/cpio /usr/bin/cpio /usr/bin/cpio /bin/cpio
/usr/sbin/tar /usr/bin/tar /usr/bin/tar /bin/tar
tar cvf /dev/rmt/0m

tar cvf /dev/rmt/0m

tar cvf /dev/rmt/0m file tar cvf /dev/rmt/0m file
tar xvf /dev/rmt/0m tar xvf /dev/rmt/0m
Tape Devices

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux
/vol/dev/dsk/cXtXdX (CD-ROM) /dev/dsk/c0tXd0

(”X” is address)
/dev/rmt/0m (tape) /dev/rmt/0m
/usr/bin/eject /usr/bin/tcio -r
Software

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
/usr/sbin/pkgadd /usr/sbin/swinstall /usr/sbin/pkg_add rpm -i[U]vh installp -a
/usr/sbin/pkginfo /usr/sbin/swlist /usr/sbin/pkg_info rpm -qa lslpp -L
/usr/sbin/pkgrm /usr/sbin/swremove /usr/sbin/pkg_delete rpm -e installp [-r|-u]
/usr/bin/showrev -p /usr/sbin/swlist | grep PH instfix -ia
/usr/sbin/patchadd /usr/sbin/swinstall instfix
/usr/sbin/patchrm /usr/sbin/swremove installp -r
/usr/sbin/pkgchk /usr/sbin/swverify lppchk
/usr/sbin/swmtool /usr/sbin/swinstall,

/usr/sbin/swremove
/usr/bin/pkgmk

/usr/sbin/swpackage

Daemons

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux
/usr/bin/cron

/usr/bin/cron

/usr/sbin/cron /usr/sbin/cron
/usr/bin/atq /usr/bin/at -q /usr/bin/atq /usr/bin/atq
/usr/bin/atrm

/usr/bin/at -r

/usr/bin/atrm /usr/bin/atrm
Backup/Restore

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux
/usr/sbin/ufsdump /usr/sbin/fbackup,

dump,

rdump
/sbin/dump backup
/usr/sbin/ufsrestore /usr/sbin/frecover,

restore,

rrestore

/sbin/restore restore
Core Files

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux
/usr/bin/savecore

/sbin/savecrash

/sbin/savecore
/usr/sbin/crash /usr/sbin/crashutil
/usr/bin/coreadm /etc/rc.config.d/savecrash
Disk Formatting

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux
/usr/sbin/format /usr/bin/mediainit /sbin/disklabel [?] /sbin/mke2fs [?]
Disk Partitioning

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux
/usr/sbin/format /usr/sbin/pvcreate,

vgcreate,

lvcreate
/sbin/fdisk /sbin/fdisk
Disk Maintenance

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux
/usr/sbin/format /usr/sbin/pvremove,

vgremove, lvremove,

vgreduce, lvreduce,

vgextend, lvextend,

pvdisplay, vgdisplay,

lvdisplay

Printer/Plotter

Solaris 8 HP-UX 10.x 11.x FreeBSD Linux AIX
/etc/printers.conf

/usr/lib/lp/model

/usr/bin/lpstat /usr/bin/lpstat /usr/bin/lpstat
/usr/bin/lp /usr/bin/lp
/usr/bin/cancel /usr/bin/cancel qcan
/usr/spool/lp/model /usr/lib/lp/model

Split big files into many small files

# split -l 100 test test_
That will split the test file into different files with test_** name every file have 100 lines of test file. You can see below files after executing that command.
# ls -la
total 56
drwxr-xr-x 2 root root 4096 Jul 4 07:36 .
drwxr-x— 6 root root 4096 Jul 4 07:35 ..
-rw-r–r– 1 root root 18477 Jul 4 07:34 test
-rw-r–r– 1 root root 4059 Jul 4 07:36 test_aa
-rw-r–r– 1 root root 5333 Jul 4 07:36 test_ab
-rw-r–r– 1 root root 5374 Jul 4 07:36 test_ac
-rw-r–r– 1 root root 3711 Jul 4 07:36 test_ad

# cat test |wc -l
360
# cat xaa |wc -l
100
# cat xab |wc -l
100
# cat xac |wc -l
100
# cat xad |wc -l
60
#

Solaris gathering system information command

How to get the information about the processor.

The psrinfo utility displays processor information. When run in verbose mode, it lists the speed of each processor and when the processor was last placed on-line (generally the time the system was started unless it was manually taken off-line).

/usr/sbin/psrinfo -v

The psradm utility can enable or disable a specific processor.

To disable a processor:
/usr/sbin/psradm -f processor_id

To enable a processor:
/usr/sbin/psradm -n processor_id

The psrinfo utility will display the processor_id when run in either standard or verbose mode.

RAM
The prtconf utility will display the system configuration, including the amount of physical memory.

To display the amount of RAM:

/usr/sbin/prtconf | grep Memory
Memory size: 3072 Megabytes

Processor and kernel bits
If you are running Solaris 2.6 or earlier, you are running a 32-bit kernel.

Determine bits of processor:
isainfo -bv

Determine bits of Solaris kernel:
isainfo -kv

Disk space
Although there are several ways you could gather this information, the following command lists the amount of kilobytes in use versus total kilobytes available in local file systems stored on physical disks. The command does not include disk space usage from the /proc virtual file system, the floppy disk, or swap space.

You can use df -k

df -lk | egrep -v “Filesystem|/proc|/dev/fd|swap” | awk ‘{ total_kbytes += $2 } { used_kbytes += $3 } END { printf “%d of %d kilobytes in use.\n”, used_kbytes, total_kbytes }’
19221758 of 135949755 kilobytes in use.

for the directory disk space used you can use
# du -sk *

You may want to convert the output to megabytes or gigabytes and display the statistics as a percentage of utilization.

The above command will list file system usage. If you are interested in listing physical disks (some of which may not be allocated to a file system), use the format command as the root user, or the iostat -En command as a non-privileged user.

Vi editor commands

:e! reread file and erase all changes
:s/old/new/gc ==> replace all occurence of regular expression old
:50,100 s/old/new/gc as above on line range
u undo last change
:# print current line with line no.
:.= print line no. of current line
:= print line no. of last line in current file
:se nu set line no.
:se noic set case match

sed command example

sed will delete lines 1-10 of the output:
$ sed -e ‘1,10d’ /etc/services | more

delete lines that start with a ‘#’
sed -e ‘/^#/d’ /etc/services | more

sed ’s/fubar/foobar’ filename

sed -e ’s/color/colour/g’ -e ’s/flavor/flavour/g’ filename

Hot to create tab or Space in HTML code