Latest LQ Deal: Linux Power User Bundle
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 12-13-2002, 12:50 PM   #1
Registered: Dec 2002
Location: IL
Distribution: NetBSD, Slackware, Gentoo, Debian, FreeBSD
Posts: 444

Rep: Reputation: 31
how do you view

How do you view a README or INSTALL file from the terminal?? every place i searched for installing software tutorials assumes that you already know how...-thanks
Old 12-13-2002, 01:03 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 250Reputation: 250Reputation: 250

Its the less or more commands that are easiest to use and view. If its not a big file you can also use cat.
Old 12-13-2002, 01:06 PM   #3
Registered: Jun 2002
Posts: 411

Rep: Reputation: 30
there are several terminal editors

i use vi

cd (to the directory of your file)
at the prompt type:
vi filename

when you are done hit Esc

this same editor will allow you to edit your linux config files. it would be a good idea to learn one.

if you have an x windows session open and are using a virtual terminal, you can use a gui editor gedit (for gnome)

Last edited by rioguia; 12-13-2002 at 01:07 PM.
Old 12-13-2002, 03:43 PM   #4
Registered: Dec 2002
Location: IL
Distribution: NetBSD, Slackware, Gentoo, Debian, FreeBSD
Posts: 444

Original Poster
Rep: Reputation: 31
ok, thanks...i tried the less INSTALL and more INSTALL commands but they seem the same...what is the difference?? -thanks agin
Old 12-13-2002, 05:14 PM   #5
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 8.04
Posts: 668

Rep: Reputation: 31
The "less" is a pager, meaning you can go up and down the file.
Old 12-13-2002, 07:18 PM   #6
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
but frequently they ARE the same program (more being turned into a pseudonym for less)
Old 12-14-2002, 10:02 AM   #7
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Rep: Reputation: 30
Use pico filename to edit the file, vi will also work but pico is much easier for newbies. To view the file you can also type "cat filename | more" which is probably the same as just typing more filename..
Old 12-14-2002, 10:55 AM   #8
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 250Reputation: 250Reputation: 250
Basically the big difference I see is when using less, you'll stay within view of the file until you hit Q to exit out. With more, if you keep scrolling down to the end of the file, you'll end back up at a prompt.
Old 12-14-2002, 11:13 AM   #9
Registered: Oct 2002
Location: North Atlanta
Distribution: LFS
Posts: 229

Rep: Reputation: 30
actually less is a more clone... although there is actually a bit (albeit not a lot) more things you can do with less
Old 12-14-2002, 06:35 PM   #10
Registered: Nov 2002
Distribution: Mandrake 9.0
Posts: 58

Rep: Reputation: 15
If you want a graphical program, you could use "gless", this pops a window up with your text in it. If you want to edit the text, gedit or gxedit work pretty good.
Old 12-15-2002, 09:39 PM   #11
LQ Newbie
Registered: Oct 2002
Distribution: Red Hat 6.2
Posts: 4

Rep: Reputation: 0
Use a viewer to see an install or a readme file, not an editor - you have no reason to change the file, besides which viewers are simpler to use. more and less are both good - you can move a screen at a time in more, one direction only, by hitting the space bar, a line at a time with the return key. Scroll up and down in less with the up and down arrows, back a full screen (very useful to just go back read something again) with control+b - b on its own works on some files but not all to scroll back a screen in more. I have no idea why it only works sometimes. cat is only useful for files not larger than one screen in size.

Add in what trickykid said and you've about got the lot. The attractions of those viewers is how simple they are to use. Less has the advantage of going backwards as well as forwards, except for those files where b works in more, and it stays in the file when you reach the end. That's minor, because the up arrow from the command prompt will give you the more command again, anyway. Exit either at any time with the q key. Note the keys cited, b and q, are lower case.

BTW, to use any of them, using more as the example, at the command prompt type more /pathtofile/nameoffile and hit return.

Last edited by jazzclubber; 12-15-2002 at 09:54 PM.


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
In addition to "view new posts" about "View last 24 hours" KimVette LQ Suggestions & Feedback 3 10-30-2005 11:22 AM
view your posts synaptical LQ Suggestions & Feedback 1 06-13-2005 01:49 PM
W2K cannot view samba share but can view NT FiveFlat Linux - Software 3 06-10-2005 03:54 PM
Everyone View/Use DaveyB Linux - Newbie 6 08-17-2004 08:08 AM
View more than 25 threads on the "view new posts" page lfslinux LQ Suggestions & Feedback 2 02-02-2002 01:07 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:27 PM.

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