![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
| Display Modes | Rate This Thread |
|
|