Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-25-2003, 07:44 AM   #1
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Rep: Reputation: 30
how to edit a txt file through console

i am using a built in vedio card intel 82845g/gl wich has no support on xfree 4.2.1

so the solution is:
modify the /etc/X11/XF86Config-4 file and change the driver line to:

Section "Device"
Driver "vesa"

but i don't know how shall i edit a txt file under console
can anyone help me plz
Old 01-25-2003, 08:01 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
use a text editor, like pico, vi, emacs... check their manpages for info.
Old 01-25-2003, 08:02 AM   #3
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you can use vi

vi is not too complicated to run, but you need to learn the commands first.
before attempting to edit a file back it up like this
cp filename filename.bak
then you can restore it to the original if something gets whacked.

basically vi has several modes. when you open a file like this

vi filename
vi will be in command mode. press the i key to enter insert mode and edit your file, you can move the cursor with the arrow keys.

hit escape to get back to command mode
this command will save and exit the file


from command mode you can delete, letters, words and lines easily by positioning the cursor and use this
dl = delete letter
dw = delete word
dd = delete line
also something like this
will delete 10 lines

Last edited by DavidPhillips; 01-25-2003 at 08:06 AM.
Old 01-25-2003, 09:50 AM   #4
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Original Poster
Rep: Reputation: 30
thanx alot
Old 01-25-2003, 10:24 AM   #5
Registered: Nov 2002
Location: Central VA
Distribution: Ubuntu/Debian
Posts: 228

Rep: Reputation: 32
A friend sent me a great PDF with a summary of vi commands. You can find it at my site:

PS - I think the current DDoS attack may be affecting my DNS so you might not be able to get to the site right now but try back later.

PSS - Looks like the DNS is back up.

Last edited by cmfarley19; 01-25-2003 at 04:23 PM.
Old 01-31-2003, 07:39 PM   #6
LQ Newbie
Registered: Jan 2003
Location: MA
Posts: 12

Rep: Reputation: 0
Hey cmfarley19

Thankx for hosting the PDF files.

Thats just what i was looking for.

"Cheat Sheets" that i can print out....



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Txt extension file translation UltraSoul Solaris / OpenSolaris 3 05-21-2005 11:11 AM
c++ writing to a .txt file xemous Programming 8 09-01-2004 10:57 PM
How do I edit services from the console? brandor Fedora 3 05-25-2004 03:17 PM
How to convert a txt file to be a db file in Redhat linux 9? winnie Linux - Newbie 3 06-27-2003 08:33 AM
txt file to html > right forum ? saavik Programming 7 04-16-2002 08:42 AM > Forums > Linux Forums > Linux - Newbie

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

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