LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-19-2004, 05:44 PM   #1
mjewell
Member
 
Registered: Jan 2004
Location: Missoula, MT
Distribution: most recently, slackware
Posts: 49

Rep: Reputation: 15
edit a file


To solve a problem with a sound driver, I'm told I need to uncomment a particular driver in a particular rc file. Imagine my embarassment when I realize that I don't know how to edit a file.

I used cd to change to the right directory and cat to display the info in the file I wanted to edit. . . . Than I was stuck.

All I want to do is change what is written in the file and then exit the file with my changes saved. Its dawning on me that there may be a command I'm supposed to be using because changing this one rc file may require changes elsewhere??? Anyway, as usual, I'm stuck.
 
Old 01-19-2004, 05:48 PM   #2
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Debian, Android
Posts: 1,819

Rep: Reputation: 46
Depending on the editor you want to use it is as simple as

emacs filename

or

vi filename

or even

kwrite filename.

Type man emacs or man vi for help using the editors.
 
Old 01-19-2004, 05:53 PM   #3
pgreenwood
LQ Newbie
 
Registered: Nov 2003
Location: Omaha, Nebraska USA
Distribution: Debian and derivatives; dabbled in others
Posts: 26

Rep: Reputation: 1
Re: edit a file

Quote:
Originally posted by mjewell
All I want to do is change what is written in the file and then exit the file with my changes saved. Its dawning on me that there may be a command I'm supposed to be using because changing this one rc file may require changes elsewhere??? Anyway, as usual, I'm stuck.
Focusing only on the "edit file" piece of your question, my editor of choice in most cases is midnight commander. If installed on your machine the command is:

~$ mc

or

~# mc

depending upon whether you need root privileges to modify the file.

With mc running, navigate to the chosen file, then touch F4 to open in edit mode. Save changes with F2.

Modify your configuration (F9 I think) to include "lynx-like" navigation, then you can navigate between directories with arrows as well as the Enter key.
 
Old 01-19-2004, 05:53 PM   #4
mjewell
Member
 
Registered: Jan 2004
Location: Missoula, MT
Distribution: most recently, slackware
Posts: 49

Original Poster
Rep: Reputation: 15
I feel dumb but thanks. I'm going to try it now . . . .
 
  


Reply


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
How to edit a file jimbrechin Linux - Newbie 6 03-26-2005 01:25 AM
Trying to edit a file AndreL Linux - Newbie 2 03-24-2004 06:45 AM
edit a file - how? michaeltweak Linux - Software 6 02-01-2004 11:25 AM
how do i edit a file andym Linux - Software 6 04-16-2003 12:09 PM
how do I edit a file? JunLitsu Linux - General 7 04-10-2002 01:21 PM


All times are GMT -5. The time now is 08:35 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration