Jul 15, 2019

Some of the useful Unix Commands

A. Getting the Header file information using the '$Header' text for the specific file

i)   strings -a $AU_TOP/forms/US/POXSCASL.fmb | grep '$Header' 

ii)  more /u02/migrate/prod_release/2019/prod_20190205/po_rebrand/shell_runme.sh | grep 'obs_dir' 

iii) grep -ir abc*

iv)  find /tmp -name $file_name -mtime +7 -exec rm -vf {} \; >> $SCRIPT_LOG/trace_purge_files.log 

B. To list the Database running list

ps -ef|grep pmon 

C. To list the Size of the mount point

df -h  

D. To list the Scheduler Jobs

crontab -l & crontab - e 

E. Zip and Unzip the group of files

zip -rp filname.zip filename

unzip -rp filname.zip 

F. To List JAR Files

jar xvf customall.jar  

G. To send the Mail from Unix box

mail -S smtp=relay.stp.org.com -s "Space Alert For $(hostname): Disk space $usep%" person@orgcorp.com

H. FMB Compilation to get FMX using the frmcmp_batch command

frmcmp_batch userid=apps/<pwd> module=POXSCASL.fmb output_file=$PO_TOP/forms/US/POXSCASL.fmx module_type=form batch=no compile_all=special

I. To list the unix files under the certain path

ls -lrt | more

a) To list Top 25

ls -ltr | head -25 

b) To list Bottom 5

ls -ltr | tail -5

c) To list intermediate among the 50 files (ex. To list only the 20-25 files in the 50 listed files)

ls -ltr | head -25 | tail -5

No comments:

Post a Comment

Useful Workflow Commands

  WFLOAD apps/columbus789 0 Y DOWNLOAD APEXP_FINDEV.wft APEXP Locations: $PO_TOP/patch/115/import/US/porpocha.wft $PO_TOP/patch/115/import/U...