hri

harman_research

StopTheJunkMail















 

Solaris Unix Commands & Scripts for Sun Microsystems 

Below are some commands and scripts that are used by the team here at Harman Research.  They were mostly used on Solaris 7, 8, 9 and 10 systems.

Also, feel free to check out our Oracle 8i 9i, 10g page or the SQL Server page.  

Check out the the Books/Manuals that we use Regularly.

Enjoy!!

 

Versions of Solaris Explained

SunOS is the core operating system comprising the kernel, utilities and basic libraries.  Solaris is the broader environment comprising SunOS, OpenWindows and networking support. In other words, SunOS is a component of Solaris.

SunOS and Solaris relate to each other as follows:

For example, when one does a 'uname -a' this reports that the server has SunOS 5.6 installed which means that it actually got Solaris 2.6 installed. .

SUN OS Version Is Solaris Version
SunOS 5.4 Solaris 2.4
SunOS 5.5 Solaris 2.5
SunOS 5.5.1 Solaris 2.5.1
SunOS 5.6 Solaris 2.6
SunOS 5.7 Solaris 7 
SunOS 5.8 Solaris 8
SunOS 5.9 Solaris 9
SunOS 5.10 Solaris 10

 

How Can we tell  Solaris OS is running 32-bit or 64-bit?

Use the isalist command to determine whether the machine is running

the 32-bit or 64-bit operating system. If you are running the 64-bit

operating system on an UltraSPARC machine, then isalist

will list sparcv9 first

How to boot in  64/32 bit mode?

To boot a 32-bit kernel, at the ok prompt type:

ok boot [disk or net] kernel/unix

 

To boot a 64-bit kernel (default), at the ok prompt type:

ok boot [disk or net] kernel/sparcv9/unix

ok boot [disk or net]

Run job in batch now:

at -s now < thejob.sh

Show current process active

ps -efa

Show process information

psrinfo -v

Show version of unix

uname -a

Display System Configuration

sysdef

or

prtconf

Print VTOC

prtvtoc /dev/dsk/c0t0d0s0

Query Disk space

df -k disk space in kilobytes

du -sk disk space summary in kilobytes

How To Configure Sun 450 Hot swap disk drives

1. drvconfig

2. disks

Remove all files and sub-directories

rm -r *

Move all files from one directory to another using tar pipe

from directory /var

mkdir /var1

cd /var

tar cf - . | (cd /var1 && tar xBf -)

Directory compare (don't show files that are the same)

dircmp -s /var /var1

Give User execute permission on a file 

chomod u+x filename gives execute permission to the owner.

Find command to find in current directory and sub directory

find . -name "dbmslogmnr.sql" -print


DATE Command

date mmddHHMM[[cc]yy]

example "date 022610221998"

Get DATE from another unix box 

rdate pluto

Find Command for certain size files

find . -size +10000c

This example say find all the file > 10000 bytes.

 

Find command to find a word in the directory and sub directory

find . -exec grep -ls pkzip {} \;

 

 

 
Copyright © 1998-2014 Harman Research Inc.
 
Privacy Statement