![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Deleting lines inside a file without opening the file | toms | Shell Programming and Scripting | 3 | 09-24-2007 04:58 AM |
| prob with spaces in reading a file | Amardeep | Shell Programming and Scripting | 2 | 05-23-2006 08:54 AM |
| Opening a file during FTP | ceaker | High Level Programming | 1 | 03-31-2006 11:40 PM |
| opening a file | hiei | UNIX for Dummies Questions & Answers | 4 | 03-31-2004 09:24 PM |
| Dos window, long file names prob | kymberm | Windows & DOS: Issues & Discussions | 4 | 10-10-2002 10:18 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
it will show maximum lines right from starting of file Could you please elaborate based on line numbers in the file ? |
|
#3
|
||||
|
||||
|
check if less command is what you want
|
|
#4
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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.
|
|||
| Google The UNIX and Linux Forums |