≡ Menu

unix version

HowTo: grep Text Between Two Words in Unix / Linux

I got over 100s of HTML files in the following format:

 <title>Statistics for ABC LTD - January 2007 - Rang IDXYZZAZZZZ</title>
<body BGCOLOR="#E8E8E8" TEXT="#000000" LINK="#0000FF" VLINK="#FF0000">
<h2>Statistics for ABC LTF</h2>
Summary Period: January 2007<br />
Generated 01-Feb-2007 06:40 CET<br />
<hr />
<font SIZE="-1"></font></p></center><pre>
my data 1
my data 2
my data 3
my data 10000
my data N times

Generated by MyAppDbStatsWriter (UNIX) version 1.9b2

How do I extract text between two words (<PRE> and </PRE>) in unix or linux using grep command?
[click to continue…]

Find: UNIX Operating System Release and Version Number

How do I find Unix version and release number using command line options? What version, release, and maintenance level of Unix is running on my system?
[click to continue…]

Solaris UNIX: Display LUNs

How do I display LUNs under Solaris UNIX version 10 or earlier?
[click to continue…]

Linux / UNIX Recursively Search All Files For A String

How do I recursively search all text files for a string such as foo under UNIX / Linux / *BSD / Mac OS X shell prompt?
[click to continue…]

Howto find out AIX UNIX RAM size memory from command line

Q. How do I find out the memory size of my AIX UNIX server? Can you tell us the command name to do the same?

A. You need to use bootinfo command to determines and displays various boot information, including boot device type and boot device name.

Command to check RAM in AIX UNIX

The bootinfo command uses the device configuration databases in information searches.

Just type the following command as the root user:
bootinfo -r

It will displays amount of real memory in kilobytes. bootinfo command may not be available in latest AIX UNIX version, try following command:
$ lsattr -El sys0 | grep realmem

svmon command - Captures and analyzes a snapshot of virtual memory

The svmon command displays information about the current state of memory. The displayed information does not constitute a true snapshot of memory, because the svmon command runs at user level with interrupts enabled. To print out global statistics, type:
# svmon -G

Read the man page of svmon for more information.