LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-24-2008, 10:56 AM   #1
dave247
Member
 
Registered: May 2004
Posts: 206

Rep: Reputation: 30
can't see all 20,160 lines in a file when 'cat filename'


So I have a file on a remote server that I am sshing to and it contains exactly 20160 lines -- I know because I did 'wc -l file' -- but when I try to view all the lines by using the cat or vi command, it only displays around 500 lines and then stops. Would this have to do with limitations of the cat command or anything like that?

It might just be that this particular remote server doesnt have much memory or something (it is a VERY OLD box), but I'm not sure if that matters in this case.

Any thoughts?
 
Old 10-24-2008, 12:12 PM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
probably an XOFF character in the stream (typically ctrl-S), that'll cause the terminal to stop output until it gets XON (typically ctrl-Q)
 
Old 10-24-2008, 02:23 PM   #3
dave247
Member
 
Registered: May 2004
Posts: 206

Original Poster
Rep: Reputation: 30
im not sure what that means estabroo
 
Old 10-24-2008, 03:20 PM   #4
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
What estabroo is saying, is that you should look at the contents of the file, around the last line that is displayed. it probably contains a special character that is turning off the cat request to print to the screen.

Make a copy of the file, and find the last line that cat produces. Remove the following line and retry, this will tell you if there was a special character, as it should then proceed past the point that it previously failed.
 
Old 10-25-2008, 05:13 PM   #5
dave247
Member
 
Registered: May 2004
Posts: 206

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Disillusionist View Post
What estabroo is saying, is that you should look at the contents of the file, around the last line that is displayed. it probably contains a special character that is turning off the cat request to print to the screen.

Make a copy of the file, and find the last line that cat produces. Remove the following line and retry, this will tell you if there was a special character, as it should then proceed past the point that it previously failed.
Nah, the file is numbers and file names. Theres nothing that should stop it..
 
  


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
cat: output specific number of lines mikeshn Linux - Software 8 01-24-2017 11:08 AM
Change name of backup file in ext3 from filename~ to .filename~ Libu Linux - General 2 07-21-2008 09:29 PM
filename ends in '\' won't open in emacs or with cat command - why? tardo0807 Linux - Newbie 2 02-14-2008 10:11 AM
bash: how to edit cat <filename> | grep <keyword> feature? sirpelidor Linux - Software 2 06-20-2005 02:00 PM
Can you find the error ? (160 lines) math-cases etc Dimitris Programming 5 09-02-2003 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:28 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