More solaris commands

2010-06-29 417 words 2 mins read

These commands are taken from various sources and are quite helpful for day to day work on solaris.

For find n grep

grep -i m_forwardingProxy `find . -name \*cpp`

grep -i XVarBind `find . -name \*h`

grep -i gSLEncodeMode `find .  -name ”*.cpp” -o -name ”*.h”`


find . \( -name ”*.cpp” -o -name ”*.h” -o -name ”*.c” -o -name ”*.cc” -o -name ”*.inh” -o -name ”*.inc” -o -name ”*.sm” -o -name ”*.asm” \)

ipcs – status of the shared memory segment: 

ipcrm -s id – To clear the shared memory segment (id can be got by ipcs command.)

uname -a

which xxx – path of the xxx


type xxx – path of the xxx

who am i – present user details

who|cut -f 1 -d ’ ’|sort |uniq

who | awk '{print $1}’ | sort | uniq


source – To execute the command

chmod -r 777 * – To change the permissions




ctags -R . – To create tag file for code browsing

ctags -L – To create tag file for all the file list

pushd . – Pushes the current path on the Stack

popd . – Pops the current path from the Stack

snoop -x -20 port [To check the packets on the port]

groupadd cworks

useradd -g cworks -d /export/home/cworks -m -c ”cworks” cworks

useradd -g ccusers -d /export/home/naveenc -m -c ”Naveen’s NIS Login” -u 3224 naveenc

passwd cworks

passwd -s cworks

grep ”^cworks:” /etc/shadow

nslookup [For querying DNS]


ps -aef | grep -i


prstat -p –> Process Stat

pfiles –> File Descriptors of the process

pmap –> Memory Map of the process

pstack / –> Stack Trace of the process

ps -p -L –> Threads of the process

gcore –> Snapshot of present core image of the process

useradd -g 5001 -d /export/home/skumar -m -c ”Sunil’s NIS Login on Ripley” -u 2002 skumar

useradd -d /export/home/skumar -m -c ”Sunil’s NIS Login on Ripley” -u 2002 skumar

ln -s

ln -s /pilgrimvobs/pilgrim/testbed/sparc/ptestbed ptestbed

To grep a particular column, PID in the below case:

ps -aef | awk '{print $2}’

To search descriptors in use:

pfiles `ps -aef | awk '{print $2}’` > descriptors.txt

prtconf — To get system information.

gcc/dcc compilation with -E option gives precompilaton output

gcc/dcc -E …… | less [This will help in seeing the output]

To change the date:

date mmddHHMM[[cc]yy]

cc – century

yy – year

wall – To broadcast message

ndd – get and set driver configuration parameters

ndd /dev/tcp


Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it