best find command
This is just one of the best find statements I have ever seen. # find /sbin -xdev -type f -size +1024 -exec ll {} \; | awk ‘{print $9, $5}’ | sort -rn +1 | awk ‘{print $1, $2/1024/1024 “MB”}’ | more /sbin/powermig 2.67188MB /sbin/powercf 1.70703MB /sbin/emc/emcpmgr 1.58984MB /sbin/vxdisk 1.50439MB /sbin/vxdg 1.45749MB /sbin/vxrelayout 1.37262MB /sbin/vxrecover […]
Hung Solaris Zone : shutting_down state
I had a zone stuck in shutting_down state. No matter what I did I was not able to shut it down. But this worked. # ps -fz myzone UID PID PPID C STIME TTY TIME CMD root 2850 1 0 Jul 22 ? 0:00 zsched 0040620 18081 1 0 – ? 2529:10 defunct The problem […]
Yum Commands
list packages yum list install package yum install Yum Cheat Sheet http://yum.baseurl.org/wiki/YumCommands
Solaris 10_Recommended bundle link
Direct Links to the Solaris Bundles. It will prompt you for your oracle support login credentials. https://updates.oracle.com/patch_cluster/10_Recommended.zip https://updates.oracle.com/patch_cluster/10_x86_Recommended.zip https://updates.oracle.com/patch_cluster/10_Recommended.README https://updates.oracle.com/patch_cluster/10_x86_Recommended.README
Netmasks
Bitmask (Bits) Dotted Decimal Hexadecimal Binary /0 0.0.0.0 0x00000000 00000000 00000000 00000000 00000000 /1 128.0.0.0 0x80000000 10000000 00000000 00000000 00000000 /2 192.0.0.0 0xc0000000 11000000 00000000 00000000 00000000 /3 224.0.0.0 0xe0000000 11100000 00000000 00000000 00000000 /4 240.0.0.0 0xf0000000 11110000 00000000 00000000 00000000 /5 248.0.0.0 0xf8000000 11111000 00000000 00000000 00000000 /6 252.0.0.0 0xfc000000 11111100 00000000 00000000 00000000 […]
Sticky Bit
The “s” is a “sticky bit” which sets that property for all subsequently created subdirs and/or files. Depending on where the “s” is dictates if it’s “suid” or “sgid” ‘man chmod’ will give more info 1755 = drwxr-xr-t 2755 = drwxr-sr-x 3755 = drwxr-sr-t 4755 = drwsr-xr-x 5755 = drwsr-xr-t 6755 = drwsr-sr-x 7755 = […]
Solaris Shutdown Logs
rc6.log in /var/svc/log Other important logs in here too.
Compare two files grep what matches
# cat list1 a b c # cat list2 a b c d e f g h i j k A B C D E F G # cat list1 | xargs -n 1 -i grep -i {} list2 a A b B
chown symbolic link
To update the ownership of a symbolic link. You need to use the -h option. # chown -h user:group mylink
Solaris lucreate ERROR: Unable to mount boot environment
# /usr/sbin/luupgrade -u -n NEWBE -s /mnt -k /tmp/sysidcfg 64459 blocks miniroot filesystem is Mounting miniroot at ERROR: Unable to mount boot environment . Live Upgrade uses /a as a temporary mount point and directory for some of its actions. Check /a to make sure it is empty in the current BE and the new […]