Exclude all dotfiles?

Hi there,

I am on Linux and want to perform a backup of my entire /home directory.

But only of my actual documents.

Don't need to backup my config and dotfiles.

Would --exclude '.*{/**,}' be the correct filter to exclude any kind of config or dotfile (files and folders)?


i think it would be

--exclude=**/.** --exclude=/.**

1 Like

Thanks! Doesn't mine merge those two together?

I'm not sure. Perhaps. You can test it but i figured i'd just keep it simple.

you can use --dry-run and you can do some testing.

I think you could simplify that to just --exclude ".**" which means exclude any files starting with a . and any files in directories starting with ..

Note that rclone lsf -R --exclude ".**" /path is a great way of testing what gets excluded!

1 Like


and any files in directories starting with ..

Would that also exclude the hidden (.) directory itself?

Yes it should do

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.