Recent Articles


A List Of Amazon S3 Backup Tools
In an effort to replace my home backup server with Amazon's S3, I've been collecting a list of Amazon S3 compatible backup tools to look at.Here's what I've discovered, followed by my requirements.

Apple's Unix To Surpass Linux?
Tom Yager dusted off his crystal ball this morning in order to answer the question "where will Linux thrive?" He also made a prediction regarding the effect of Apple's Unix on the future of Linux. The answer to the first question, however, is that Linux will become "the de facto...

Red Hat Choice Academic To Colleges
The company announced a trio of universities would adopt Red Hat Enterprise Linux and Red Hat Network solutions for some of their computing needs. Wake Forest University, the University of Washington, and...

Centrify Boosts Unix Access To Active Directory
The company announced at the LinuxWorld Conference & Expo that its DirectControl Suite now supports a number of UNIX and Linux platforms. The list of platforms Centrify said it can offer Microsoft Active Directory...

Filepro Conversion
In years past, I did a lot of Filepro work. This goes way, way back: I worked on the first Tandy Xenix version when it was still beta - so beta that it couldn't even do floating point math reliably! I liked the product: it was fast (still is), partially relational, and had enough features to create...

Legacy ISA
I found a professed "competent" student at the local university who spent a couple of hours destroying the setup in one of the machines. We now have one machine working. That's a snippet from email I got yesterday. The owner of the machines is a local doctor, and the...


10.24.06


Vi In A Nutshell

By Pete Freitag

The unix text editor vi< probably has more features than Microsoft Word yet I've only been using about 5 of them. Recently I've been learning a bit more about it.

I now know some of the more handy features thanks to the VI reference in forth edition of Unix in a Nutshell which was just released in October.

The reason I think vi is an important editor to learn is that it is typically installed on any unix system (including Mac OSX) by default. Other unix text editors such as emacs aren't installed by default as often.

Basic VI features (beginners only)

Using vi is pretty easy if you know a few things about it, if you don't you probably won't even be able to edit or save a file. Lets start by editing a file /tmp/somefile

vi /tmp/somefileVi starts up in command mode, you can give VI commands to run such as delete this line, search for this, etc.

To start we want to give the insert command so hit i, you should see -- INSERT -- at the bottom of the screen. Go ahead and write a haiku or something.

Now to save it you need to go back into command mode this is done by hitting ESC now type wq (this means write and quit).

Ok that's the basics you can get pretty far just knowing that.

Low Rate eCommerce & Retail Plans

Handy Features in VI

Here's a list of some of the commands that I have found to be quite handy:

• Search :/pattern - search for pattern in the file. This can be a regular expression. Hit n to go to the next match.

• Find and Replace :s/find/replace/g

• Go to End of Line $

• Beginning of Line ^

• Last line in the file L

• Middle of the file M

• Top of the file (Home) - H

• Go to line 10 :10

• Delete current line dd

• Copy or yank a line Y - you can use 5Y to copy 5 lines. Also try yG, and y$.

• Paste p

• Undo u

• Redo Ctrl+R

*Originally published at Pete Freitag's Homepage


About the Author:
Pete Freitag (http://www.petefreitag.com/) is a software engineer, and web developer located in central new york. Pete specializes in the HTTP protocol, web services, xml, java, and coldfusion. In 2003 Pete published the ColdFusion MX Developers Cookbook with SAMs Publishing.

Pete owns a Firm called Foundeo (http://foundeo.com/) that specializes in Web Consulting, and Products for Web Developers.

About UnixProNews
UnixProNews is a collection of news and commentary designed to keep you in step with the ever evolving landscape of Unix environments. News and Advice for Unix Professionals

UnixProNews is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITCertificationNews.com


-- UnixProNews is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2006 iEntry, Inc. All Rights Reserved Privacy Policy Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


News and Advice for Unix Professionals UnixProNews News Archives About Us Feedback UnixProNews Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact