Solved

Need example for executing "pg" command

Posted on 2004-04-03
4
588 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
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 125 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now