Click to See Complete Forum and Search --> : Viewing Text Files


Jody
09-28-2004, 08:36 AM
I know this sounds like a stoopid question, but I am a newbie to Linux. I recently installed Slackware 9.1 on a spare computer so I could get some experience with this OS before I replace windows on my servers. I'd really like to read some of the thousands of text files but everytime I try to view a text file I get ouput as displayed below.

root@scorpian:/lib/proftpd-1.2.10# ed NEWS
73205

I get similiar output for every README file i try to view.

Where am i going wrong..??

deathadder
09-28-2004, 09:05 AM
Erm I don't know :-), have you tried 'cat filename' or for long text files 'cat filename |more'

bathory
09-28-2004, 09:52 AM
You can use another erditor, such as:
vi, joe, pico
or just less filename

mrBen
09-28-2004, 09:52 AM
ed is a line editor - it's doing exactly what it is supposed to do: reading the file into it's buffer.

If you _really_ want to use ed (and trust me, you don't) then check out the man page (man ed). For instance, to see the first line of the file, type 1 and hit enter. For line 2, type 2. etc, etc, etc

If you are just wanting to view a file, then less <filename> should do the trick. If you are looking to edit, well, there are a raft of editors better than ed....... Most systems will have some sort of vi installed, but you should also look out for nano and pico which are slightly more newbie-friendly. Then, of course, there is the _huge_ emacs, which many people swear by.

I am assuming, of course, that you are looking for command line editors. There are also loads of graphical ones.

As a point of note, I personally use vi (or rather, vim - VI iMproved), but have also used things like nano, pico, jed, etc.

HTH

Jody
09-28-2004, 05:57 PM
Thankyou all for the fast responses. I used the "cat <filename>" and i can spend hours and hours reading through the documentation for Linux...

:)