LinuxQuestions.org
Register a domain and help support LQ
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 10-08-2002, 06:20 PM   #1
pilotgi
Member
 
Registered: Apr 2002
Location: ks
Distribution: openSUSE 12.2 64 bit
Posts: 488

Rep: Reputation: 32
A really basic question


I've been using Linux for 6 months now and have yet to figure out one very simple thing.

When I use, say the cat command, all the data whizzes by on the screen until the end and then I get the familiar blinking cursor after my user name.

The question is: how do I get back to the beginning of all this data to start reading?

I've tried the up arrow, home, page up, backspace, tab, and ctrl b,
all with no luck. This also applies to anytime I'm at the command line and I've typed in enough stuff so I can't see where I started.

How do I get back to the beginning?
 
Old 10-08-2002, 06:26 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
use "less" instead of "cat" or shift+pgup/pgdn on most terminals, including a basic console.
 
Old 10-08-2002, 06:40 PM   #3
pilotgi
Member
 
Registered: Apr 2002
Location: ks
Distribution: openSUSE 12.2 64 bit
Posts: 488

Original Poster
Rep: Reputation: 32
That worked.

Thanks
 
Old 10-09-2002, 11:08 AM   #4
kriton12
Member
 
Registered: Oct 2002
Posts: 81

Rep: Reputation: 16
also, you can always |more (pipe it to more) or just use more to read it. it's the same as less, more or less hahahahaha...

more filename
cat filename | more
less more

you get the idea
 
Old 10-09-2002, 11:11 AM   #5
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 56
And if you're a GUI fan, you could try this:
cat filename | gless
 
Old 10-11-2002, 03:32 PM   #6
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Rep: Reputation: 30
cat filename | less
will work too
 
Old 10-11-2002, 05:34 PM   #7
shakira
LQ Newbie
 
Registered: Oct 2002
Posts: 10

Rep: Reputation: 0
and also use Shift +pageup or Shift+pagedown if the file is not very big.
 
Old 10-14-2002, 04:24 AM   #8
msober
LQ Newbie
 
Registered: Oct 2002
Location: Under the sea
Distribution: slackware-current
Posts: 25

Rep: Reputation: 15
I believe it is | less at the end of a command, so

cat | less

should work. I would look into buying a quick refference type book about linux.
 
Old 10-14-2002, 12:19 PM   #9
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 56
cat | less wouldn't work unless cat was given something to pipe to less. You could have cat | less < filename, but that's just making things silly
 
Old 10-14-2002, 12:49 PM   #10
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
cats, pipes, less something. Cool, this is definitely a geek talk thread Or a high school bully chat, but I prefer the geek talk

Cool
 
Old 10-14-2002, 04:57 PM   #11
Dexatrim
LQ Newbie
 
Registered: Aug 2002
Posts: 15

Rep: Reputation: 0
Of course, there's always

cat <filename> | sed | less

although

less <filename>

is briefer.
 
  


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
Basic Question insyte Linux - Wireless Networking 4 09-16-2004 11:57 AM
Basic C++ question ooagentbender Programming 10 12-10-2003 09:34 PM
*very* basic c question usernamed Programming 9 08-21-2003 08:29 AM
Very basic question rajanr Linux - Newbie 2 07-23-2003 03:13 AM
basic question kurgan70 Linux - General 2 12-06-2001 03:42 PM


All times are GMT -5. The time now is 04:19 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration