Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Little help with rsync --exclude

Shell Programming and Scripting


Tags
exclude, ksh arguments, rsync

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-09-2013   -   Original Discussion by B_ROX
B_ROX's Unix or Linux Image
B_ROX B_ROX is offline
Registered User
 
Join Date: Dec 2013
Last Activity: 13 December 2013, 10:32 AM EST
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Little help with rsync --exclude

Loving the rsync command and beginning to write some scripts with it.
However I'm hung up on the --exclude function.

Script is tested and works great BEFORE I put the --omit in.
What am I doing wrong in my syntax?


rsync $OPTS /cis/cloverleaf/cis6.0/integrator/ $REMHOST:/home/hci/rsync/integrator --exclude 'processes*' --exclude 'uninstall*' > ${ERRFILE}

So I'm trying to get everything in the /cis/cloverleaf/cis6.0/integrator/ directory, except the files inside /cis/cloverleaf/cis6.0/integrator/abchub/exec/processes directory.
I'm trying to move all that over minus the files inside /processes
and
anything with the word Uninstall in the /integrator directory
over to /home/hci/rsync/integrator on a remote server.

What am I missing with the syntax of --exclude
Help!!!
Sponsored Links
    #2  
Old Unix and Linux 12-10-2013   -   Original Discussion by B_ROX
MadeInGermany's Unix or Linux Image
MadeInGermany MadeInGermany is offline Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 22 May 2018, 4:55 AM EDT
Location: Simplicity
Posts: 4,077
Thanks: 351
Thanked 1,374 Times in 1,238 Posts
Maybe the order is wrong? All options first:


Code:
rsync $OPTS --exclude 'processes*' --exclude 'uninstall*' /cis/cloverleaf/cis6.0/integrator/ $REMHOST:/home/hci/rsync/integrator > $ERRFILE 2>&1

Also be as precise as possible to not have unwanted matches.
E.g. --exclude '/processes*' --exclude '/uninstall*'
The Following User Says Thank You to MadeInGermany For This Useful Post:
B_ROX (12-13-2013)
Sponsored Links
    #3  
Old Unix and Linux 12-13-2013   -   Original Discussion by B_ROX
B_ROX's Unix or Linux Image
B_ROX B_ROX is offline
Registered User
 
Join Date: Dec 2013
Last Activity: 13 December 2013, 10:32 AM EST
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
what would the syntax look like of I wanted to keep the processes directory, but not include any of the files inside?
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
[Solved] Using Find with an exclude/exclude file metallica1973 Ubuntu 2 10-23-2011 10:07 AM
Tar exclude haezeban SCO 2 01-26-2010 11:28 AM
rsync exclude option KiranKumarKarre Shell Programming and Scripting 1 06-02-2009 07:24 AM
rsync - exclude statement not working em23 Shell Programming and Scripting 1 08-21-2008 06:47 PM
Creating and using a /.rsync/exclude komputersman Shell Programming and Scripting 0 03-19-2008 06:13 PM



All times are GMT -4. The time now is 10:04 AM.