User Tools

Site Tools

Return to Home page


This shows you the differences between two versions of the page.

Link to this comparison view

cs:rsync [2019/02/26 14:33]
cs:rsync [2020/11/26 23:18] (current)
Line 1: Line 1:
 +====== Rsync ======
 +''rsync'' is a useful program of the Linux shell to perform backup copies, both local and remote
 +===== Copy of specific file types =====
 +In this example, ''rsync'' is used to copy file with specific extensions (i.e., ''html'', ''css'', ''jpg'', ''gif'' and ''png'') from the folder with name ''www'' to the folder with name ''www_backup''. The directories tree in ''www'' is copied as is in ''www_backup''.
 +<code bash>
 +rsync -avm --include='*.html' --include='*.css' --include '*.jpg' --include '*.gif' --include '*.png' --filter 'hide,! */' www www_backup
 +the option ''--filter 'hide,! */''' means to ''hide'' anything that is not (''!'') a directory (''*/''). The option ''--filter'' has lower precedence than the ''--include'' options, so this rule excludes all the file with the exception of the files reported in the ''--include'' options.

If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at]

You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url:

Privacy Policy