LinuxQuestions.org
Help answer threads with 0 replies.
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 03-12-2007, 01:12 AM   #1
foysol_bgd
LQ Newbie
 
Registered: Feb 2007
Posts: 14

Rep: Reputation: 0
Cat command Option


Hi,

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

Thanks.
 
Old 03-12-2007, 01:44 AM   #2
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,138

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, 01:58 AM   #3
foysol_bgd
LQ Newbie
 
Registered: Feb 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Oskar,

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

Regards,

Fazlur.
 
Old 03-12-2007, 02:03 AM   #4
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,138

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 02:07 AM.
 
Old 03-12-2007, 09:56 AM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
You can "page" a file directly with less:
Code:
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 .

Quote:
less is more than more.
more is less than less.
The more you less, the less you more.
 
Old 12-11-2008, 11:33 AM   #6
donzo37
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
 
  


Reply

Tags
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 10:31 PM
Cat and Sed Command Help. vidyashankara Linux - General 22 06-23-2006 02:32 PM
cat command juanb Linux - Newbie 4 08-19-2004 12:14 PM
what are the limits to the 'cat' command? Frybyte Linux - General 12 04-22-2004 05:32 PM
cat Command Moeses Linux - General 1 06-20-2002 04:27 AM


All times are GMT -5. The time now is 03:15 PM.

Main Menu
Advertisement
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