Thursday, October 24, 2013

list directories in GB starting with largest in the current working directory.

Here is the quick one:

cd to the current directory. Ex. cd /opt/apps/

du -hk | grep "[0-9][0-9]G" | sort -rn

thats it - 1 Cent :-)

Tuesday, October 1, 2013

Stale NFS file handle error after patching

login as root run fsck/lsof to check in case any files related
process are still hanging around.

In my case I did the same but I would get the Stale NFS file handle error.
searched for the man page .... and -l optin with umount did the trick.

[root@prodhost01 ~]# umount /export/brd_prod
umount: /export/brd_prod: device is busy
umount: /export/brd_prod: device is busy

umount -l /export/brd_prod

man umount

-l     Lazy  unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore.
              (Requires kernel 2.4.11 or later.)

-----------------------------