Solved

Need example for executing "pg" command

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
llcommand 6 91
Linux : adding the new user with password option, 11 107
AIX 5.x set up arrow to recall 11 53
Access_log 17 121
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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.

776 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