Showing posts with label root. Show all posts
Showing posts with label root. Show all posts

Wednesday, September 18, 2013

How to find a file or files using maximum space on Unix Systems like Solaris , Linux, HP-UX or AIX?

Example For Finding out the file bigger than 100MB
find /var -xdev -size +100000000c -exec ls -lh {} \;

-xdev is being used so that you can find out the file in the filesystem where /var is located. Many times we have other filesystems as well part of /var like /var/crash(which is mounted from a another Filesystem) . 

So, my advice is to always xdev to ensure that you are searching in the right directory.

Sunday, May 19, 2013

Unlock a user account on Aix


Run the below commands to unlock the user account on Aix

#chsec -f  /etc/security/lastlog -a "unsuccessful_login_count=0" -userid
#chuser "account_locked=false" -userid