Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Logic to chech # of parameters command line parameters Linux/Unix
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • Proc Compilation Oracle
  • Insert cause enqueue locks Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • Import and export statements Oracle
  • How to Make Trace Files Created by Oracle Readable by All Users ? Oracle
  • age_alert.ksh aging out alert.log Linux/Unix
  • Oracle Identifiers Oracle
  • Unix split command to split files Linux/Unix
  • get_vmstat_solaris Oracle
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle
  • chk_space_SID.ksh Linux/Unix
  • Temporary Tablespace Information and restriction. Oracle
  • proper cpu stats Linux/Unix

Follwoing korn shell is used to move files from source folder to destination folder and gzip it in destination folder. mv_iotto.ksh

Posted on 20-Jun-2006 By Admin No Comments on Follwoing korn shell is used to move files from source folder to destination folder and gzip it in destination folder. mv_iotto.ksh

#!/usr/bin/ksh

a=`ps -ef|grep “mv_iotto.ksh”|grep -v grep|wc -l`

if [ $a -gt 2 ]

then

echo “Exiting because of more than 1 Moving archive log script is running ”

exit

fi

for fname in `ls -rlt /tmpdb2/oradata/UOCIOTTO_ARCH/*.arc | awk ‘{print $9}’ | sed ‘$d’ | sed ‘$d’`

do

print “”;

print “File Name : $fname “;

dest_file=`echo $fname| cut -c31-80`;

print “dest_file = $dest_file”;

dest_file_with_path=”/tmpdb4/oradata/UOCIOTTO_ARCH/$dest_file”;

print “dest file with path = $dest_file_with_path”;

print “Processing mv $fname $dest_file_with_path…..”;

mv $fname $dest_file_with_path;

print “Processing gzip $dest_file_with_path…..”;

gzip $dest_file_with_path;

done

Linux/Unix, shell

Post navigation

Previous Post: sess_server.sql
Next Post: How to stop OCSSD Daemon

Related Posts

  • How to sort list of files on basis of their sizes. Linux/Unix
  • Generate SSH without password authentication. Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • rm_backup_arch_file.ksh Linux/Unix
  • Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets. Linux/Unix
  • Changing default shell Linux/Unix

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Order by with ROWNUM Oracle
  • Jai Shree Ram Oracle
  • How to sort list of files on basis of their sizes. Linux/Unix
  • Adding or Dropping Online Redo Log Files When Physical Standby in place Oracle
  • Find_planinfo.sql Oracle
  • alter database backup controlfile to trace Oracle
  • Good link for LIO in Oracle ( Logical IOs) Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme