cs:rsync
Return to Home page
If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at] skenz.it
You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/cs/rsync
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
.
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] skenz.it
You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/cs/rsync
/web/htdocs/www.skenz.it/home/data/pages/cs/rsync.txt · Last modified: 2024/04/08 22:35 by 127.0.0.1