LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-24-2007, 02:31 AM   #1
Peter_APIIT
Member
 
Registered: Dec 2006
Posts: 606

Rep: Reputation: 31
Vi Problem


Hello all expert administrator, i have OpenBSD 4.1 installed on my pc.

I have a file where consists of many lines. Therefore, i lazy to look it line by line.

I have read through the manual pages to find a command to go directly to a specific line such as count and line but unsuccessful.

Therefore, i start this thread in order to get some help.

Thanks for your help.

Your help is greatly appreciated by me and others.
 
Old 11-24-2007, 03:07 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Is it a text file? If so, using less, you can enter the line number and hit "g" or "G". In vim, if you are in the command mode, enter the line number and press the "G" key. In this case it has to be an Upper case G.

If you are looking for a certain pattern, you can enter a "/" and then the pattern. The pattern can be a regular expression. This works in both vim and less.
 
Old 11-24-2007, 03:08 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Just enter the line number followed by "G".

jschiwal beat me on the line ...

Last edited by jlliagre; 11-24-2007 at 03:19 AM.
 
Old 11-24-2007, 07:17 PM   #4
Peter_APIIT
Member
 
Registered: Dec 2006
Posts: 606

Original Poster
Rep: Reputation: 31
Thanks a lot. You are all so helpful.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration