Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • rm_backup_arch_file.ksh Linux/Unix
  • Good Link from metalink 1 Oracle
  • DBA_HIST_SQLSTAT contents Oracle
  • cp_filesystem.sql Oracle
  • sesswait.sql Oracle
  • Default User Profile Oracle
  • catall.sh Linux/Unix
  • Find Stale DR Physical Standby Oracle
  • To find explain plan for a statement that occurred in past. Oracle
  • find_longsql.sql Oracle
  • runsql_once.ksh Linux/Unix
  • Distributed Transaction Troubleshooting. Oracle
  • SQL Tracker by SID sqltrackerbysid.sql Oracle
  • How to calculate PROCESSES parameter Oracle
  • Space padding in korn shell 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

  • Some OS level threshold for performance. Linux/Unix
  • set_env_dba Linux/Unix
  • How to collect CPU usage on Linux using Shell script Linux/Unix
  • fdisk -l explaination about Primary-Logical-Extended Partitions Linux/Unix
  • ipcs -l Linux/Unix
  • handling filenname with space 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
  • DBMS_PROFILER for tuning PLSQL programs. Oracle
  • V$transaction notes for finding XID composition. Oracle
  • Good Doc 28-JUN-2006 Oracle
  • Query to Generate aggregate on every 30 mins. Oracle
  • Load SPM baseline from AWR Oracle
  • useful dg links Oracle
  • Running select from V$ views from remote server Linux/Unix
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme