File opening prob. plz assist guys


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu File opening prob. plz assist guys
# 1  
Old 07-26-2008
File opening prob. plz assist guys

Hi friends, this problem is pretty similar to the thread that i have generated earlier.
If the TXT file that i have opened using "cat" is huge then my putty can only show me last few lines. Similarly if i use "more" command to open a huge TXT file then it asks to press any key to scroll up the text.
Is there any way out by which instead of scrolling up whole file (like which happens when we use "cat") it will show maximum lines right from starting of file and den will ask to press any key to scroll next maximum possible contaits?
I hope i have put my problem succesfully before u.
Please assist guys.
Thanx in advance
Anushree
# 2  
Old 07-26-2008
Code:
it will show maximum lines right from starting of file

I don't understand this. What do you mean by maximum lines right from the beginning ?

Could you please elaborate based on line numbers in the file ?
# 3  
Old 07-26-2008
check if less command is what you want
# 4  
Old 07-26-2008
if i cat a file i can read last 241 lines only... i cant see complete file in one go... for e.g. i hv cat a huge txt file hving 5000 lines then i can see last 241 lines only. What can i do to see entire file? I m using linix / unix thro' putty
# 5  
Old 07-26-2008
Have you tried the less command as Yogesh Sawant mentioned?
There are a lot of options to scroll within a file with less. You can search for patterns in your file with /pattern.
To go to line 50 you can type 50g, with 100 you can scroll 100 lines down etc.

Read the manpage of less for other options.

Regards
# 6  
Old 07-29-2008
Dear Franklin, I dont kno how to use less command. Can u please assist me?
when i use less <file name> i am getting following error
ksh: less: not found
# 7  
Old 07-29-2008
less is a replacement for more. If it's not installed, you will need to install it. It's open source, so you can download and compile it yourself; but if you are not familiar with basic Unix developer tools, it's probably easier to get it from your vendor. How and what exactly depends on your platform. For RPM-based Linux, try rpmsearch. For Debian and Ubuntu, apt-get install less. For big-iron "real" Unix, contact your local system administrator. You most likely need root access to install packages system-wide, but there may also be an option to install for your private use.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Opening a file in vi and automatically save and quit this file using shell script

Hi friends, In my shell script, I want to open a file using vi editor. After opening the file in vi, I want to save and quit this file automatically.... all through shell script. the code segment is: ------------------------------------------------------------ cd ~/netfpga/projects/scone/sw/... (2 Replies)
Discussion started by: sachinteotia
2 Replies

2. Shell Programming and Scripting

Xmllint - Xml-file problem --ods file not opening

Dear All, this is my first post on this Forum, glad to be here. I'm trying to fix an .ods file. Yes, I had a backup, but it's also corrupted. When opening the document I get this EM: read error format error discovered in the file in sub-document content.xml at 2,337040(row,col). So I... (3 Replies)
Discussion started by: jameslast
3 Replies

3. Shell Programming and Scripting

Interpretion problem. Plz Help me guys.

Hey friends, below mentioned script is giving me proper o/p which can be “1” or “2” echo select status_ac from db_acct where acct_num='$1'" | dbaccess elstest Now I want to interpret the o/p as follows. If o/p is 1 then “YES” If o/p is 2 then “No” And to do this I have modified above... (2 Replies)
Discussion started by: anushree.a
2 Replies

4. Shell Programming and Scripting

Output formatting prob.. guyz plz hlp

:)Hi guys, I have written a script that returns 3 things of all the employees in my organisation. i.e. Name, Login time & log out time of each and every employee. It returns the output in pipe-delimited format. For your ref. sending a small sample e.g. Deepti|083032|174501... (5 Replies)
Discussion started by: anushree.a
5 Replies

5. Shell Programming and Scripting

how to know whether that file has eol or noeol before opening that file in VI editor

Hi, I want to check whether file has EOL or NOEOL before opening this file in VI editor. My file is very big its in terms of 15-20 MB. I am using ksh for this. When we opened the file in vi editor, normally at last line we are able to see whether this is eol or noeol file. But i does want... (1 Reply)
Discussion started by: HariRaju
1 Replies

6. Shell Programming and Scripting

prob with spaces in reading a file

i have a file in unix having data like cat dog (having spaces in the beginning) when i read it in a shell script cat file_name |while read line do echo $line done it will print cat dog spaces at the beginning are removed.... i dont want these spaces to be... (2 Replies)
Discussion started by: Amardeep
2 Replies

7. Shell Programming and Scripting

Plz Help To convert xml file to text file using bourn shell scripts

If someone out there could help me out with this problem. I would really appreciate it. I am trying to convert xml into text file(fixed length) using Unix Borne shell scripts. My xml file: <root> <header_rec recordtype="00"> <record_id>00</record_id> <country_code>AK></country_code>... (0 Replies)
Discussion started by: ram2s2001
0 Replies

8. UNIX for Dummies Questions & Answers

opening a file

im trying to open a file in my bin directory and the farthest i can get is into the folder but not the actual file itself i use text edit as the editor. when i try to open the file it says it doesn't exist here is what i type cd bin open cmnds (dir. which it is under) open test no such... (4 Replies)
Discussion started by: hiei
4 Replies

9. Windows & DOS: Issues & Discussions

Dos window, long file names prob

At the dos command prompt, does anyone remember how to make it recognize long file names? ie, windows long file names for folders, my documents, if i'm at the :> prompt and want to change to that directory, how do i make it skip the space? I've tried cd "my document" cd my\documents cd 'my... (4 Replies)
Discussion started by: kymberm
4 Replies

10. UNIX for Dummies Questions & Answers

plz Help How should I configure cc compiler output file plz help???

i.e configuration of C compiler :confused: (4 Replies)
Discussion started by: atiato
4 Replies
Login or Register to Ask a Question