Download your favorite Linux distribution at LQ ISO.
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 03-12-2007, 12:12 AM   #1
LQ Newbie
Registered: Feb 2007
Posts: 14

Rep: Reputation: 0
Cat command Option


I like to view a file by Cat command and want to see it page by page, How can I?

Old 03-12-2007, 12:44 AM   #2
Senior Member
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
man cat

if there is no option for cat that does that, you can pipe it through less

cat [filename] | less

quit less with q
Old 03-12-2007, 12:58 AM   #3
LQ Newbie
Registered: Feb 2007
Posts: 14

Original Poster
Rep: Reputation: 0

Thanks for your help. It is working but with the cat [file name] | more command.


Old 03-12-2007, 01:03 AM   #4
Senior Member
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
I thought so... cat is one of those programs whose programmers are religious about bloat. (joke)

you can use pipes (|) for alot of stuff.
It simply sends the output of the last command to the next one.
same works with "ls -l | less"
or "locate stuff | grep cool"
which would search for "stuff" and filter it so only lines that contain cool and stuff are being printed.

Last edited by oskar; 03-12-2007 at 01:07 AM.
Old 03-12-2007, 08:56 AM   #5
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
You can "page" a file directly with less:
less <filename>
It also has many useful options, many more than more. RTM for both of them & compare.

Most people I know never use more unless less is missing from the system they're working at -- then they complain bitterly, often cursing 3 or more generations of the installer's family .

less is more than more.
more is less than less.
The more you less, the less you more.
Old 12-11-2008, 10:33 AM   #6
LQ Newbie
Registered: Dec 2008
Posts: 3

Rep: Reputation: 0
Cool Paging by piping

Thanx I had a similar problem with flying scrolls - can't wait to try it


less, paging

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
cat in asm/ cat --show-all option Tux Linux - Software 1 09-02-2006 09:31 PM
Cat and Sed Command Help. vidyashankara Linux - General 22 06-23-2006 01:32 PM
cat command juanb Linux - Newbie 4 08-19-2004 11:14 AM
what are the limits to the 'cat' command? Frybyte Linux - General 12 04-22-2004 04:32 PM
cat Command Moeses Linux - General 1 06-20-2002 03:27 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:46 AM.

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