Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • chk_space_SID.ksh Linux/Unix
  • v$backup.status information Oracle
  • When to rebuld B-tree index Oracle
  • Good Doc 28-JUN-2006 Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • Oracle Standby Database Library Index from Metalink Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • oracle 11g RAC on vmware Oracle
  • mutex in Oracle 10.2.0.2 or Oracle 10g Oracle
  • Clean up Oracle
  • find_err.sql for finding errors from dba_errors. Oracle
  • Configure ssh authentications for RAC Oracle
  • Oracle Internal Good Websites 1 Oracle
  • Find nth max and min. Oracle
  • ORA-1841 Error Connecting to Upgraded Database After Set PASSWORD_LIFE_TIME 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

  • Find Command Linux/Unix
  • adding new line after specific pattern using sed Linux/Unix
  • Search and Replace vi editor command. Linux/Unix
  • rm_backup_arch_file.ksh Linux/Unix
  • Useful Solaris Commands on 28-SEP-2005 Linux/Unix
  • Logic to chech # of parameters command line parameters 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
  • Find sort details from Db find_sort.sql Oracle
  • RMAN : Consistent Backup, Restore and Recovery using RMAN Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • scp with ssh2 Linux/Unix
  • Implementing Listener Security Oracle
  • checking connectivity between two servers Linux/Unix
  • configUOCIOTTO.ora Oracle
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme