Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Knoppix Help Forum > New to KNOPPIX 4.0 Please help?

Forgot Password?
 Knoppix Help Forum   For all discussions about Knoppix, the Linux "Live CD" that lets you run Linux without needing to install on your hard drive.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 12-13-2007   #1 (permalink)
Just Joined!
 
Join Date: Dec 2007
Posts: 2
New to KNOPPIX 4.0 Please help?

Within KNOPPIX 4.0 I have created 2 seperate files one file I want to edit using the ed inside the shell-Konsole window but where is it located? The other file I must edit using the vi editor how do I access that editor as well?

how do I Use an editor available in my Konsole window that is not the vi editor to edit a file. I was told to Try using the command-line text editor "ed" in the Shell - Konsole window. Where is this text editor "ed" located?
jasonmollett is offline  


Old 12-13-2007   #2 (permalink)
Super Moderator
 
ozar's Avatar
 
Join Date: May 2004
Posts: 12,056
Welcome to the forums!

If you want to edit files outside of your /home directory, you'll need root permissions to do so. Just go to a terminal or konsole (look for it in your applications menu) and enter su, then enter your root password when it's requested.

Then you can use vi or ed to edit the files:

Code:
vi /path/to/file/
I've never used ed, but am guessing it starts the same way:

Code:
ed /path/to/file
Here's a good website for learning the command line under Linux:

http://www.linuxcommand.org

Enjoy the Linux experience!
__________________
oz

New Members: * README *
ozar is offline  
Old 12-13-2007   #3 (permalink)
Super Moderator
 
ozar's Avatar
 
Join Date: May 2004
Posts: 12,056
In addition to that above, I think Knoppix gives the option to use sudo rather than su if you want to go that route. In that case, you'd skip on entering su in the terminal and just enter the word sudo before each command, something like this:

Code:
sudo vi /path/to/file/
...enter user password when requested.
__________________
oz

New Members: * README *
ozar is offline  
Old 12-13-2007   #4 (permalink)
Just Joined!
 
Join Date: Dec 2007
Posts: 2
Ozar for instance I have created two documents mollett.v1 and mollett.ed1 I have some text in both and I must edit using the "ed" editor and vi editor. The location of the two files is /mnt/sdb1/pos-420/Week2. From within the Week 2 directory I go to tools and click on open terminal if I wanted to edit the text in one of the files what do I have to do next. I am actually taking a UNIX course with University of Phoenix and I am missing something here we are in week 2 and I totally do not understand UNIX for the life of me.

This is the actual assignment I am working on currently

Knoppix Assignment 2

In your week2 directory create two identical files. Name one “yourlastname”.ed1 (e.g. miller.ed1) and the other “yourlastname”.vi (e.g. miller.vi). The contents of the two files should be:

There once was a man from Nantucket,
Who carried his lunch ina bucket,
Saih he with a sigh,
I am very full As he ate a whole pie,

Using an editor available in your Konsole window that is not the vi editor edit the *.ed1 file:
Add the following line after the last line:
If I just had a donut I’d dunk it.

Remove all text on the fourth line before the word As
Correct misspelled words ina and Saih
Save the file and exit the editor


Using the vi editor on the *.vi file
Add the following line after the last line:
If I just had a donut I’d dunk it.

Remove all text on the fourth line before the word As
Correct misspelled words ina and Saih
Change the limerick so it reflects a woman instead of a man (change all occurrences of man to woman, his to her, and he to she) using search and replace feature
Save the file and exit vi
Place the word count of the two files in a file called “yourlastname”.out (e.g. miller.out)
Change Nantucket to Pawtucket in the *.ed1 file using the sed command
Append the last two lines of each file to the file called “yourlastname”.out without cutting and pasting (Hint: tail command can do this)
Find the differences between the two files and append the result to the file called “yourlastname”.out (Hint: diff command can do this)
Use grep to find files contaning Pawtucket and append the output to the file called “yourlastname”.out
In your week2 directory create the script in Project.3-7 and name it “yourlastname”.3-7 (e.g. miller.3-7)
Attach your four files to a message posted in the Assignments NG
jasonmollett is offline  
Old 12-13-2007   #5 (permalink)
Linux User
 
Agent-X's Avatar
 
Join Date: May 2005
Location: Dimension X
Posts: 261
This is more of an scripting problem than a knoppix problem.
Other than that, read an ed tutorial on the web.
__________________
Agent-X is offline  
Old 12-13-2007   #6 (permalink)
Super Moderator
 
ozar's Avatar
 
Join Date: May 2004
Posts: 12,056
Sorry, Jason, but the forums rules prohibit the posting of homework questions:

http://www.linuxforums.org/forum/lin...ums-rules.html

However, I have already given you the procedure you'd need to use in order to edit text files.

If it still makes no sense to you, maybe you can consult with your instructor for additional advice.
__________________
oz

New Members: * README *
ozar is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 07:57 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2