Linux – Duplicity – How to exclude hidden files / folders

linux

How can I exclude hidden files and folders when using Duplicity to backup my data?

I have tried –exclude '.*' –exclude '.' –exclude '**.'

These exclude everything except the folders I have specified with –include

Best Answer

. and .. are special names for this directory and this directory's parent respectively.

You probably want something like .??* as your match pattern. This pattern requires at least three characters in the file name. It should exclude all hidden files and directories. It will miss directories like .a, but I haven't run across any such directories in the wild.