Note du

How to synchronize a tree directory only matchnig one type of file? My use case is generating a website AND a gemini capsule at once with Hugo, and splitting gemini content into another directory for a lighter space management on a capsule.

rsync to the rescue (as always) with its (a bit strange) --include and --exclude set of options:

rsync -zarvm --include="*/" --include="*.gmi" --exclude="*" public/ /some/dest/dir/

source: SO: rsync copy over only certain types of files using include option

blog hugo gemini web