👤
Home Man
Search
Today's Posts
Register

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

Tags
exclude, ksh arguments, rsync

👤 Login to reply

 
Thread Tools Search this Thread
# 1  
Old 12-09-2013
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!!!
# 2  
Old 12-10-2013
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)
# 3  
Old 12-13-2013
what would the syntax look like of I wanted to keep the processes directory, but not include any of the files inside?
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Rsync Error: rsync: link_stat failed: No such file or directory (2) mohtashims Shell Programming and Scripting 2 02-06-2018 09:21 AM
Rsync exclude & include? mnnn Shell Programming and Scripting 5 08-29-2016 12:10 PM
Exclude txt file in rsync SmokeyJoe UNIX for Dummies Questions & Answers 2 10-17-2014 01:37 PM
Exclude a file or not in guddu_12 Shell Programming and Scripting 1 05-31-2012 05:03 AM
[Solved] Using Find with an exclude/exclude file metallica1973 Ubuntu 2 10-23-2011 10:07 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
exclude a line big123456 Shell Programming and Scripting 3 04-24-2008 12:31 PM
Creating and using a /.rsync/exclude komputersman Shell Programming and Scripting 0 03-19-2008 06:13 PM
du (exclude files) the_learner UNIX for Advanced & Expert Users 1 07-17-2007 02:06 PM


All times are GMT -4. The time now is 08:36 AM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password