cancel
Showing results for 
Search instead for 
Did you mean: 

Linux command

SOLVED
Go to solution
Ridzuan Zakaria
Frequent Advisor

Linux command

Hi,

I am currently moving my shell (sh/ksh) scripts from HP-UX 11.11 environment to our newly acquired "Red Hat Enterprise Linux AS release 3 (Taroon Update 1)" enviroment. I found that Linux do not have "pg" command. Can anyone suggest what command should I use in place of "pg".

One more thing how do I know what is my OS release version? "uname -a" return the following output.

Linux XXX 2.4.21-9.ELsmp #1 SMP Thu Jan 8 17:08:56 ES
T 2004 i686 i686 i386 GNU/Linux

Thanks.


Thanks.
quest for perfections
4 REPLIES
Stuart Browne
Honored Contributor
Solution

Re: Linux command

A 'pg' replacement on RHES3 could be either 'less' or 'more'. Just create a symbolic link to either of them:

ln -sf /usr/bin/less /usr/bin/pg

If you were relying upon 'pg', you might also want to put an exported 'PAGER' variable in some profiles.

The release (version) of Linux is 'uname -r', which would be '2.4.21-9.ELsmp' on that machine, the kernel version.

If you are wondering what platform, then you want 'uname -s' (Linux) or 'uname -o' (GNU/Linux). Note that 'uname -o' doesn't work on HP-UX, so don't use it for cross-platform testing (-s returns 'HP-UX').

Any more info needed? ;)
One long-haired git at your service...
Vitaly Karasik_1
Honored Contributor

Re: Linux command

uname -r or -a provides you with kernel version;
if you want to check OS version in RH or Mandrake linux, you should

cat /etc/redhat-release


Rgds,
Vitaly
Chris Xu
Trusted Contributor

Re: Linux command

You can determine the Red Hat OS release version by looking at the kernel release "uname -r".
2.4.9-25 ---> AS 2.1
2.4.21-9 ---> AS 3.1
2.4.21-15 ---> AS 3.2
2.4.21-20 ---> AS 3.3

So your systems is running AS 3 update 1, and it has a multi-processor kernel, indicated by "smp" after 1.4.21-9.EL.

Chris
KevinHu_1
Occasional Advisor

Re: Linux command

you can install the pg's rpm or pg's source

determine release you can try

#cat /proc/version




best regard
kevinhu