Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • note id 373303.1 Linux/Unix
  • SQL_PLAN.sql for checking real execution plan Oracle
  • Jai Shree Ram Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • login.sql Oracle
  • My FTP Job Scheduling for www.pvmehta.com PHP/MYSQL/Wordpress
  • Histogram information Oracle
  • How To Limit The Access To The Database So That Only One User Per Schema Are Connected (One Concurrent User Per Schema) Oracle
  • Goldengate document from Porus Oracle
  • Good link for LIO in Oracle ( Logical IOs) Oracle
  • block_ident.sql Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle
  • Insert cause enqueue locks Oracle
  • Oracle Material from OTN Oracle

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

  • changing kernel parameter in Oracle Enterpise Linux Linux/Unix
  • For Search and replace unix command. Linux/Unix
  • Generate SSH without password authentication. Linux/Unix
  • Removing first line Linux/Unix
  • purge_trc.sh Linux/Unix
  • Find total file sizes 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 (388)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (337)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • sess_server.sql Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • Finding last recovered file on DR and remove all chanracters before any “/” Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • Rename Oracle Instance Name Oracle
  • good note for shared pool tunnig Oracle
  • AWR license Oracle
  • rm_backup_arch_file.ksh Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme