UnixTips.net

* use my tips at your own risk !!

* use my tips at your own risk !!

Categories

  • Other (3)
  • Scripting (10)
  • Unix (70)
  • Wordpress (2)

Powered by Genesis

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 1.06357MB
/sbin/vxdmpadm 0.959419MB
/sbin/vxvol 0.953461MB
/sbin/vxdctl 0.916672MB
/sbin/vxlicrep 0.898438MB
/sbin/vgsync 0.882812MB

For Linux

find /var -xdev -type f -size +1024 -exec ls -l {} \; | awk '{print $9, $5}' | sort -rn -t" " -k2 |  awk '{print $1, $2/1024/1024 "MB"}' | more

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 was that I had a process on the zone that was defunct.

After several kill -9 the defunct process finally died and my zones shutdown and rebooted.

NOTE: YOU SHOULD NOT KILL zsched.

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
/7 254.0.0.0 0xfe000000 11111110 00000000 00000000 00000000
/8 255.0.0.0 0xff000000 11111111 00000000 00000000 00000000
/9 255.128.0.0 0xff800000 11111111 10000000 00000000 00000000
/10 255.192.0.0 0xffc00000 11111111 11000000 00000000 00000000
/11 255.224.0.0 0xffe00000 11111111 11100000 00000000 00000000
/12 255.240.0.0 0xfff00000 11111111 11110000 00000000 00000000
/13 255.248.0.0 0xfff80000 11111111 11111000 00000000 00000000
/14 255.252.0.0 0xfffc0000 11111111 11111100 00000000 00000000
/15 255.254.0.0 0xfffe0000 11111111 11111110 00000000 00000000
/16 255.255.0.0 0xffff0000 11111111 11111111 00000000 00000000
/17 255.255.128.0 0xffff8000 11111111 11111111 10000000 00000000
/18 255.255.192.0 0xffffc000 11111111 11111111 11000000 00000000
/19 255.255.224.0 0xffffe000 11111111 11111111 11100000 00000000
/20 255.255.240.0 0xfffff000 11111111 11111111 11110000 00000000
/21 255.255.248.0 0xfffff800 11111111 11111111 11111000 00000000
/22 255.255.252.0 0xfffffc00 11111111 11111111 11111100 00000000
/23 255.255.254.0 0xfffffe00 11111111 11111111 11111110 00000000
/24 255.255.255.0 0xffffff00 11111111 11111111 11111111 00000000
/25 255.255.255.128 0xffffff80 11111111 11111111 11111111 10000000
/26 255.255.255.192 0xffffffc0 11111111 11111111 11111111 11000000
/27 255.255.255.224 0xffffffe0 11111111 11111111 11111111 11100000
/28 255.255.255.240 0xfffffff0 11111111 11111111 11111111 11110000
/29 255.255.255.248 0xfffffff8 11111111 11111111 11111111 11111000
/30 255.255.255.252 0xfffffffc 11111111 11111111 11111111 11111100
/31 255.255.255.254 0xfffffffe 11111111 11111111 11111111 11111110
/32 255.255.255.255 0xffffffff 11111111 11111111 11111111 11111111
  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 17
  • Next Page »