?
Solved

Need example for executing "pg" command

Posted on 2004-04-03
4
Medium Priority
?
608 Views
Last Modified: 2013-12-27
I need an example of how one is supposed to correctly execute the pg command.  When I use the CAT command to view a file I have a hard time because the information scrolls and since I am connected through a hyperterminal it gets to be real frustrating going back to try to decipher what just passed.  I tried executing the command but I don't have the right syntax and I can't seem to find an example.
0
Comment
Question by:roduno
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Expert Comment

by:mdhmi
ID: 10750451

'pg myfile'
You might enjoy the 'more' command.  Example:  'more myfile'.  Other siblings would include 'less', 'head', and 'tail'.

Mark
0
 
LVL 48

Accepted Solution

by:
Tintin earned 375 total points
ID: 10753513
Just type in

pg file

You press the "Enter" key to get the next page.

Do a 'man pg' to see the navigation options.
0
 
LVL 4

Expert Comment

by:Otetelisanu
ID: 10754985
with pg you can give
:h

and you have help

-------------------------------------------------------
  h                     help
  q or Q                quit
  <blank> or <newline>  next page
  l                     next line
  d or <^D>             display half a page more
  . or <^L>             redisplay current page
  f                     skip the next page forward
  n                     next file
  p                     previous file
  $                     last page
  w or z                set window size and display next page
  s savefile            save current file in savefile
  /pattern/             search forward for pattern
  ?pattern? or
  ^pattern^             search backward for pattern
  !command              execute command

Most commands can be preceeded by a number, as in:
+1<newline> (next page); -1<newline> (previous page); 1<newline> (page 1).

See the manual page for more detail.
---------------------------------------------------
0
 

Author Comment

by:roduno
ID: 10762915
Thanks to all of you for the help.  The example that I needed I finally found in the man pg so thanks to tintin for that suggestion.  I was running a netstat and I did not know how to make it run one page at a time.  The syntax is: netstat -a | pg

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month8 days, 20 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question