LinuxQuestions.org
Visit Jeremy's Blog.
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 09-22-2003, 12:35 PM   #1
Paul Mon
LQ Newbie
 
Registered: Sep 2003
Posts: 12

Rep: Reputation: 0
Edit from Command Prompt


Can anybody tell me the command for editing a file from the command prompt?
Please forgive me as I'm new to Linux.

Thanks
 
Old 09-22-2003, 12:37 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
vi <filename>
pico <filename>

And many other command line text editors out there.. I'd suggest like I displayed above, learn vi and you can use pico for more user-friendliness.
 
Old 09-22-2003, 12:39 PM   #3
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
You can start emacs in a terminal, too with the "-nw" option, like this:

$ emacs -nw filename
 
Old 09-22-2003, 12:47 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
First you need an editor. There are too many to mention so I just give you a few that are commenly used (and probably installed during a normal install):

- vi (or vim, gvim)
- emacs
- joe
- jove

To edit a file from the command line:

vi <namefile> (Same for the other editors I mentioned).

You do need to know the specific 'editing codes'. These are different for just about every editor.

For vim you can do the following to get a quickstart

vi [enter]

When vi is started ('VIM - Vi IMproved' should be visible) type the following:

:help [enter]

to stop

:q

Take a look around and try out a few different editors before you get hooked on one.
 
Old 09-22-2003, 09:20 PM   #5
joseph
Member
 
Registered: Jul 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
try read a thread that started by trickykid "list of linux command from O'reilly"
It will help you
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 08:14 PM
Getting out of command prompt squirellplaying Linux - Newbie 8 05-05-2004 09:44 PM
Where do I edit the system wide command prompt? Brakki Linux - General 1 04-13-2004 01:02 AM
Command Prompt? eXdener Linux - Newbie 3 01-05-2004 05:38 PM
How to recall an old command at the command prompt? J_Szucs Linux - Newbie 9 03-07-2003 01:29 AM

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

All times are GMT -5. The time now is 12:44 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration