Link to home
Start Free TrialLog in
Avatar of roduno
roduno

asked on

Need example for executing "pg" command

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.
Avatar of mdhmi
mdhmi


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

Mark
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
---------------------------------------------------
Avatar of roduno

ASKER

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