Home » » Daily command in linux server

Daily command in linux server

Written By 1 on Monday, June 13, 2011 | 11:50 PM

Enable auto run on service guard package

    cmmodepkg -v -e packagename
   
New user creation file with password "Colt1234"defaulty

    useradd -p PHVI86MeOtRlg

userdbget/userdbset in Cluster Servers for failure logins

    userdbget -i -u <username>
    userdbset -d -u <username> AUTH_MAXTRIES

How to check big files under any filesystem

    find . -xdev -size +10000000c -exec ls -lrt {} \;

How to compress files in larger size

while :;do read L;T=/tmp/p1;gzip -9 <$L >$T && tail -1000 $L >$T-2 && cat $T-2 >$L && mv $T $L.`date +"%d%m%Y"`.gz;rm -f $T-2; echo ok;done
du - sk * | sort -n

nfs options that we user by default

cd /stage <on the required server>

# showmount -e <server name>
# mount -o soft,intr,rsize=32768,wsize=32768,timeo=30,retrans=999,retry=999 lonunx01:/dbarecovery /stage


To find a word / string value in a file /dir in Linux / HP-UX

# grep <word/string value> *

To Enable Packages on Cluster Server in HP-UX

Login with root : su –
Password: xxxxxxxxx
<root># cmviewcl
# cmmodpkg –v –e <package name>


To find utilization of folder size in file system
# du -sk * | sort -n

To search whether the pacakage is installed / not in HP-UX
# swlist -l product | gerp -i <package name>

To search a file in a complete filesystem in HP-UX
# find / |grep <filename>

To search a file # whereis <filename>

To copy a file/dir from one server to another in both unix
# scp <file/dir> <username>@remotehost:<destination path>

To change ownership of a file/dir in Both Unix
# chown <ownername>:<groupname> <filename>
# chown -R <ownername>:<groupname> <dir name>



0 Comment:

Post a Comment