Home About BC DR HA Support Training Download
You are here: Home/ GlobalSysAdmin/ AIX/ Please Login or Register

-
Current Location
-

js
  GlobalSysAdmin
    AIX
-
AIX Admin Methodology
Global Consolidation Project
All AIX admins should join
www.aixexpert.com


Join our LinkedIn Group
AIX Advanced Technical Experts
Contract Opportunities

www.LinkedIn.com

-
digg Digg this page
del.icio.us Post to del.icio.us
Slashdot Slashdot it!


LPAR Leasing
Lease an AIX / i5 LPAR
Reduce your costs

www.mtxia.com

Server Leasing
Lease a Server off-site
Reduce your costs

www.mtxia.com

Data Center Automation
Business Continuity and DR
Virtualization/Consolidation

www.mtxia.com

HMC Service
Hardware Management Console
Manage Remote AIX / i5 LPARs

www.siteox.com

Business Web Site Hosting
$3.99 / month includes Tools,
Shopping Cart, Site Builder

www.siteox.com

Disaster Recovery
Small Business Oriented
Off-Site Facilities

www.mtxia.com

IBM pSeries / iSeries
Reduce your Costs
Off-Site Server Hosting

www.mtxia.com

Script Source Code for "mkversion"

This document contains the source code for the Disaster Recovery script "mkversion".



#!/usr/bin/ksh
################################################################
#### 
#### Program: mkversion:
#### 
#### Description:
#### 
#### Creates numbered versions of a file.  The latest
#### version has the lowest number following the file name.  
#### The oldest version has the highest number following the
#### file name.
#### 
#### Author: Dana French (dfrench@mtxia.com):
#### 
#### Date: 06/17/2003:
#### 
################################################################
FNAME="${1:?ERROR: Syntax \"${0} fileName\"}"
[[ ! -f ${FNAME} ]] && echo "ERROR: ${FNAME} does not exist" && exit 1

for F in $( ls -1r ${FNAME}.+([0-9]) 2>/dev/null )
do
  [[ ! -w ${F} ]] && echo "ERROR: ${F} is not writeable" && exit 2
  [[ ! -r ${F} ]] && echo "ERROR: ${F} is not readable" && exit 3
  [[ ! -w . ]] && echo "ERROR: . is not writeable" && exit 4
done
for F in $( ls -1r ${FNAME}.+([0-9]) 2>/dev/null )
do
  cp ${F} ${FNAME}.$(( ${F#${FNAME}.} + 1 )) || exit 5
done
cp "${FNAME}" "${FNAME}.0"

This file last modified 11/02/10

-
File Versioning Script
-
 

File Versioning Doc


LPAR Leasing
Lease an AIX / i5 LPAR
Reduce your costs

www.mtxia.com

Server Leasing
Lease a Server off-site
Reduce your costs

www.mtxia.com

Data Center Automation
Business Continuity and DR
Virtualization/Consolidation

www.mtxia.com

HMC Service
Hardware Management Console
Manage Remote AIX / i5 LPARs

www.siteox.com

Business Web Site Hosting
$3.99 / month includes Tools,
Shopping Cart, Site Builder

www.siteox.com

FREE Domain Registration
included with Web Site Hosting
Tools, Social Networking, Blog

www.siteox.com

Disaster Recovery
Small Business Oriented
Off-Site Facilities

www.mtxia.com

IBM pSeries / iSeries
Reduce your Costs
Off-Site Server Hosting

www.mtxia.com