Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I want to write a program that behaves as "more" comnmand in linux. Suppose I have a very big file and I want to read it at console page ...
  1. #1
    Just Joined!
    Join Date
    Nov 2008
    Posts
    9

    imitation of more command in linux

    Hi,

    I want to write a program that behaves as "more" comnmand in linux. Suppose I have a very big file and I want to read it at console page by page. How can we achieve it.

    Plz provide code snippets also.

  2. #2
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,071
    What's wrong with using the already existing commands of either more or less?
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.

  3. #3
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Quote Originally Posted by amit_ambitions View Post
    Hi,
    Plz provide code snippets also.
    Sure, go to

    ftp://ftp.kernel.org/pub/linux/utils...linux-ng/v2.14

    and look into the text-utils directory.
    Debian GNU/Linux -- You know you want it.

  4. #4
    Linux User
    Join Date
    Mar 2008
    Posts
    287
    Have you tried setting up a dummy file and in your .bashrc include:
    less dummy_startup
    Then you can dump any file to or append to the dummy as you like.

  5. #5
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    Chapter 6 of the venerable book below develops a pager program in c ... cheers, drl
    Code:
    Title: Unix Programming Environment
    Author: Brian W. Kernighan, Rob Pike
    Edition:
    Date: 1984
    Publisher: Prentice Hall
    ISBN: 013937681X
    Pages: 357
    Categories: programming, development, software engineering
    Comments: 4.5 stars (33 reviews, 2008.07) at Amazon
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  6. #6
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Plz provide code snippets also.
    I have a better idea.

    Instead of us doing your work for you, why not give it a shot yourself, run it, debug it, and come to us with specific questions about why particular lines in your code don't work?
    --
    Bill

    Old age and treachery will overcome youth and skill.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...