Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

How to edit large files?

Original Message
Name: AnjiReddy_Puli
Date: July 17, 2006 at 05:47:46 Pacific
Subject: How to edit large files?
OS: SunOS 5.8
CPU/Ram: PIV
Model/Manufacturer: Dell
Comment:
I want to edit the first line in a large file. Using VI editor I amn't able to do, so that I thought to do using head and tail functions and then done successfully. Is there any way to achieve this in single command? Likewise anyone can give a single command to go nth line a file!
I know we can achive this using "head -n filename | tail -1", but I want to know any other option to get n'th line in a file.

Thanks and Regards,
AnjiReddy.


Report Offensive Message For Removal


Response Number 1
Name: aakashunix
Date: July 18, 2006 at 04:10:53 Pacific
Subject: How to edit large files?
Reply: (edit)
Vi will be the best to do so if your file is not bigger than 2 gigs. If yes, then do the following

1. open VI without a file name.
2. In the command mode, type :set directory=<any directory with enough free space>
3. now open the file using :e <file name>

HOpe this works for you.


Report Offensive Follow Up For Removal

Response Number 2
Name: FishMonger
Date: July 18, 2006 at 23:50:21 Pacific
Subject: How to edit large files?
Reply: (edit)
Using vi, you can open the file and position the cursor at a given line number e.g. line 5 like this:

vi +5 filename


Report Offensive Follow Up For Removal

Response Number 3
Name: Thennarasu Eswaran
Date: July 25, 2006 at 07:34:10 Pacific
Subject: How to edit large files?
Reply: (edit)
Hi FishMonger,

It's working great!!!


Thanks,
Thennarasu Eswaran


Report Offensive Follow Up For Removal

Response Number 4
Name: Thennarasu Eswaran
Date: July 25, 2006 at 22:45:05 Pacific
Subject: How to edit large files?
Reply: (edit)
In vi editor,
Press ESc
type :
and type the line number the cursor gets moved to the needed line.

(or)

press ESC
type G
type the line number
(If didn't specify by default the cursor will move to the last line in the file)

Thanks,
Thennarasu Eswaran


Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: How to edit large files?

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




acer 312T BIOS problem

K7 Turbo possible max fsb?

Pc anywher problem

WinFLP & OE/Outlook2003

Computer resets after a few minutes


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC