LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 08-19-2004, 06:26 AM   #1
juanb
Member
 
Registered: May 2002
Posts: 401

Rep: Reputation: 30
cat command


Hi ,

Using the cat command I opened a very long file.

what is the best way to open a file just to read it ( not with vi) so it will show me the file in pieces ( something like dir /p in the dos days).

thanks
 
Old 08-19-2004, 06:32 AM   #2
heema
Senior Member
 
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 47
cat filename | less
 
Old 08-19-2004, 06:33 AM   #3
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
a shorter route would be

less <filename>
 
Old 08-19-2004, 06:39 AM   #4
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,512

Rep: Reputation: 46
What about
cat filename |more
?
This will show the file in pieces.
 
Old 08-19-2004, 11:14 AM   #5
irlandes
Member
 
Registered: Nov 2003
Posts: 122

Rep: Reputation: 17
One shot

Quote:
Originally posted by bruno buys
What about
cat filename |more
?
This will show the file in pieces.
More is a one shot thing, so you cannot go back and see it again as you can with less.

Cat is a really powerful command useful for different things. yes, it will send it to less, which makes it sort of a DOS type command.

Also, you can run

cat /dev/fd0 /path/filename

to make an image of a floppy, and reversing the command will make a floppy of the stored image.
 
  


Reply



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
MSDOS version for cat command frankie_DJ General 9 07-22-2005 08:08 AM
cat command for text files minm Linux - Newbie 5 07-03-2005 12:32 AM
how to run cat command in silent mode user_linux Linux - Newbie 4 06-16-2005 10:21 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:29 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
Open Source Consulting | Domain Registration