<?xml 
version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="https://blog.roxing.net/spip.php?page=backend.xslt" ?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:atom="http://www.w3.org/2005/Atom"
>

<channel xml:lang="fr">
	<title>blog.roxing.net</title>
	<link>http://blog.roxing.net/</link>
	<description>weblog roxing.net - astuces spip, php, bash, linux &amp; more</description>
	<language>fr</language>
	<generator>SPIP - www.spip.net</generator>
	<atom:link href="https://blog.roxing.net/spip.php?id_mot=189&amp;page=backend" rel="self" type="application/rss+xml" />

	<image>
		<title>blog.roxing.net</title>
		<url>https://blog.roxing.net/local/cache-vignettes/L144xH37/siteon0-6ddb5.png?1727125340</url>
		<link>http://blog.roxing.net/</link>
		<height>37</height>
		<width>144</width>
	</image>



<item xml:lang="fr">
		<title>[rsync] Exclure un pattern de la synchro par d&#233;faut</title>
		<link>https://blog.roxing.net/rsync-exclure-un-pattern-de-la-synchro-par-defaut</link>
		<guid isPermaLink="true">https://blog.roxing.net/rsync-exclure-un-pattern-de-la-synchro-par-defaut</guid>
		<dc:date>2020-04-14T13:23:33Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>placido</dc:creator>


		<dc:subject>bash</dc:subject>
		<dc:subject>linux</dc:subject>
		<dc:subject>rsync</dc:subject>

		<description>
&lt;p&gt;rsync n'a pas de fichier de configuration g&#233;n&#233;ral pour exclure un format de fichiers lors de la synchronation. Pour se dispenser de pr&#233;ciser la r&#232;gle &#8212;exclude=&#034;truc&#034; &#224; chaque fois, on a recours &#224; un wrapper dans /bin/rsync.
&lt;br class='autobr' /&gt;
# !/bin/sh # RSYNC wrapper to exclude files by default # https://unix.stackexchange.com/questions/21701/how-can-i-exclude-files-by-default-with-rsync
&lt;br class='autobr' /&gt;
# Set path to the rsync binary RSYNC=/usr/bin/rsync
&lt;br class='autobr' /&gt;
# Look for these exclude files (&#8230;)&lt;/p&gt;


-
&lt;a href="https://blog.roxing.net/signets" rel="directory"&gt;signets&lt;/a&gt;

/ 
&lt;a href="https://blog.roxing.net/bash" rel="tag"&gt;bash&lt;/a&gt;, 
&lt;a href="https://blog.roxing.net/gnu-linux" rel="tag"&gt;linux&lt;/a&gt;, 
&lt;a href="https://blog.roxing.net/rsync" rel="tag"&gt;rsync&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;&lt;strong&gt;rsync&lt;/strong&gt; n'a pas de fichier de configuration g&#233;n&#233;ral pour exclure un format de fichiers lors de la synchronation. Pour se dispenser de pr&#233;ciser la r&#232;gle &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;--exclude=&#034;truc&#034;&lt;/code&gt; &#224; chaque fois, on a recours &#224; un wrapper dans &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;~/bin/rsync&lt;/code&gt;.&lt;/p&gt; &lt;textarea readonly='readonly' cols='40' rows='19' class='spip_cadre spip_cadre_block' dir='ltr'&gt;#!/bin/sh # RSYNC wrapper to exclude files by default # https://unix.stackexchange.com/questions/21701/how-can-i-exclude-files-by-default-with-rsync # Set path to the rsync binary RSYNC=/usr/bin/rsync # Look for these exclude files IGNORE_FILES=(~/.rsyncignore ./.gitignore ./.rsyncignore) EXCLUDE_FROM=&#034;&#034; for f in ${IGNORE_FILES[@]}; do if [[ -e $f ]]; then EXCLUDE_FROM=&#034;$EXCLUDE_FROM --exclude-from=$f &#034; fi done $RSYNC $EXCLUDE_FROM &#034;$@&#034;&lt;/textarea&gt;
&lt;p&gt;Puis dans un fichier /.rsyncignore&lt;/p&gt; &lt;textarea readonly='readonly' cols='40' rows='6' class='spip_cadre spip_cadre_block' dir='ltr'&gt;# .rsyncignore error_log .DS* cache/* local/* tmp/*&lt;/textarea&gt;&lt;/div&gt;
		&lt;div class="hyperlien"&gt;Voir en ligne : &lt;a href="https://unix.stackexchange.com/questions/21701/how-can-i-exclude-files-by-default-with-rsync" class="spip_out"&gt;Unix &amp; Linux Stack Exchange&lt;/a&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>



</channel>

</rss>
