SUN Solaris Unix Commands and Scripts
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 page , the Oracle SQL Scripts or the SQL Server page.
Check out the the Books/Manuals that we use Regularly.
Enjoy!!
- Versions of Solaris Explained
- How can we tell if Solaris OS is running 32 bit or 64 bit
- How to boot in 32 or 64 bit mode
- AT Run job in batch now
- Show current process active
- Show process information
- Show version of UNIX
- Display System Configuration
- Print VTOC of a DISK
- Query Disk space
- How To Configure Sun 450 Hot swap disk drives
- Remove all files and sub-directories
- Move all files from one directory to another using tar pipe
- Directory Compare (don't' show files that are the same)
- Give User execute permission on a file
- Find command to find in current directory and sub directory
- DATE Command
- Get DATE from another UNIX box
- Find Command for certain size files
- Find command to find a word in the directory and sub directory
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 if 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 32 or 64 bit mode
1To boot a 32-bit kernel, at the ok prompt type:
2
3ok boot [disk or net] kernel/unix
4
5To boot a 64-bit kernel (default), at the ok prompt type:
6
7ok boot [disk or net] kernel/sparcv9/unix
8
9ok boot [disk or net]
Run job in batch now:
1at -s now < thejob.sh
Show current process active
1ps -efa
Show process information
1psrinfo -v
Show version of unix
1uname -a
Display System Configuration
1sysdef
2
3or
4
5prtconf
Print VTOC
1prtvtoc /dev/dsk/c0t0d0s0
Query Disk space
1df -k disk space in kilobytes
2
3du -sk disk space summary in kilobytes
How To Configure Sun 450 Hot swap disk drives
11\. drvconfig
2
32\. disks
Remove all files and sub-directories
1rm -r \*
Move all files from one directory to another using tar pipe
1from directory /var
2
3mkdir /var1
4
5cd /var
6
7tar cf - . | (cd /var1 && tar xBf -)
Directory compare (don't show files that are the same)
1dircmp -s /var /var1
Give User execute permission on a file
1chomod u+x filename gives execute permission to the owner.
Find command to find in current directory and sub directory
1find . -name "dbmslogmnr.sql" -print
DATE Command
1date mmddHHMM\[\[cc\]yy\]
2
3example "date 022610221998"
Get DATE from another unix box
1rdate pluto
Find Command for certain size files
1find . -size +10000c
2
3This example say find all the file 10000 bytes.
Find command to find a word in the directory and sub directory
1 find . -exec grep -ls pkzip {} \\;