Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • process id based files and processes Linux/Unix
  • create PLAN_TABLE command. Oracle
  • create trigger syntax Oracle
  • OPENING A STANDBY DATABASE IN READ-ONLY MODE Oracle
  • Convert multiple rows to single column Oracle
  • Good link for LIO in Oracle ( Logical IOs) Oracle
  • Remove DOS CR/LFs (^M) Linux/Unix
  • Generate SSH without password authentication. Linux/Unix
  • sess_server.sql Oracle
  • Find sort details from Db find_sort.sql Oracle
  • fkwoind.sql fkwoindex.sql Oracle
  • Sample WW22 listener.ora Oracle
  • USE_NL and INDEX hints example Oracle
  • Processes Parameter decision Oracle
  • configUOCIOTTO.ora 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

  • 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
  • runsql_once.ksh Linux/Unix
  • Some OS level threshold for performance. Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • Oracle GoldenGate lag monitoring shell script Linux/Unix

Leave a Reply Cancel reply

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

Categories

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

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • How to find who is using which Rollback segment and how many rows or blocks in that rollback segments, Oracle
  • How to stop OCSSD Daemon Oracle
  • find_err.sql for finding errors from dba_errors. Oracle
  • Generating XML from SQLPLUS Oracle
  • Consolidated Reference List Of Notes For Migration / Upgrade Service Requests -ID 762540.1 Oracle
  • standard Monitoring – 1 Oracle
  • Jai Shree Ram Oracle
  • To see only files and/or folders using LS command Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme