Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Good Oracle Architecture In Short and point to point Oracle
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • find_open_cur.sql Find open cursorts per session Oracle
  • CTAS with LONG Column for 7.x and 8 and 8i Oracle
  • How to find pinned objects from shared pool. (pinned via dbms_shared_pool.keep) Oracle
  • DBMS_PROFILER for tuning PLSQL programs. Oracle
  • To check whether standby is recovering properly or not?? Oracle
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • SQL_PLAN.sql for checking real execution plan Oracle
  • Renaming Global Name GLOBAL_NAME Oracle
  • For Perl DBI installation and testing program PHP/MYSQL/Wordpress
  • CTAS with LONG Column for 9i and higher Oracle
  • To see how much time or progress of long transaction Oracle
  • Privilege to describe the table. Oracle
  • Jai Shree Ram 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

  • Vivek’s egrep commands to trace problem. (on linux x86-64) Linux/Unix
  • find_du.ksh to find # of files, their sizes in current folder and its subdolder Linux/Unix
  • To find all disk io ( EMC as well as local) Linux/Unix
  • switchlogfile.sh Linux/Unix
  • runsql_once.ksh Linux/Unix
  • find checksum of a file. 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 (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Locktree.sql Oracle
  • Histogram Overview Oracle
  • Explain Plan Output 2 Oracle
  • crtgr.sql /* For creating trigger from data dictionary */ Oracle
  • move_arch_files.ksh /* Good One */ Linux/Unix
  • Optimizer_Index init.ora parameter explaination. Oracle
  • adding new line after specific pattern using sed Linux/Unix
  • To see only files and/or folders using LS command Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme