Thursday 30 April 2009

Useful Unix Scripts

How to find OPatch version
cd $ORACLE_HOME/OPatch
sh opatch version

How to find perl vesrion
perl -v

Change SYSADMIN password
FNDCPASS apps/apps 0 Y system/manager mode username new_password

Find Apps Password E-Business Suite 11i
If you want the apps password for an 11i environment look in $APACHE_TOP/modplsql/cfg/wdbsvr.app

Change ownership of a directory without unsetting the sticky tab
read/execute permission: chmod -R g+rx

Find directory size
du -sh or du -sk

Find File Sizes within Directory
du -sh * sort -n (sorts by file size) or du - sk sort -n

Find files by extension
find . -name "." -type f -print

Create Symbolic Link
ln -s [source_location] [link_name]

Create Linux User
adduser [username] -p [password] -g [initial_group]

Delete Linux User
deluser [username]

Change Linux User Password
passwd [username]

View Linux Groups
more /etc/group

View Linux Users
more /etc/passwd

No comments: