The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
decompressed files to specific folders c00kie88 Shell Programming and Scripting 3 04-06-2008 06:41 PM
Copying specific files faaron3 UNIX for Dummies Questions & Answers 3 03-24-2008 01:59 PM
Copying specific folders from one server to another chris1234 Shell Programming and Scripting 4 12-18-2007 07:44 PM
unTar a specific file from remote gelbvonn Shell Programming and Scripting 2 05-25-2006 04:59 PM
Check for specific files woosaah Shell Programming and Scripting 5 01-24-2006 06:37 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-12-2008
jhoomsharabi jhoomsharabi is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 3
Copying specific files from remote m/c to specific folders

Hi All,
I am trying to rsync some of the latest files from remote m/c to my local linux box.
Folder structure in my remote m/c looks like this


Code:
/pub/Nightly/Package/ROLL/WIN
/pub/Nightly/Package/SOLL/sol
/pub/Nightly/Package/SOLL/linux

Each of the folder contains gzip files which on daily basis get updated so I am trying to get only latest or new file from these three folders

I want to sync files for all three platform in one single folder like this, my target folder should look like this:


Code:
/drive/back/Win
/drive/back/sol
/drive/back/linux

I am able to do for one platfrom but how to do it for 2 other platfrom,

situation is like this that you don't know for which platform you will get file first so need to check for all platforms in single shot and get the file from that platform to correct location.
Suppose in morning linux folder get updated first that you should be able to get file from /pub/Nightly/Package/SOLL/linux to /drive/back/linux

And this what my shell script looks like:
mirror.sh
--------
LOCAL_PATH=/drive/back/linux
LIST_OF_FILES=`find /pub/Nightly/Package/SOLL/linux -type f -daystart -mtime 0 | grep "OWL"`

for ONE_FILE in ${LIST_OF_WIN_FILES}
do
rsync --verbose --recursive --delete --times \
${ONE_FILE} \
${LOCAL_PATH} \
done

Can anyone help me out in this situation.
I will be thankful to you

Last edited by Yogesh Sawant; 06-13-2008 at 05:50 AM.. Reason: added code tags
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:50 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0