EN DE

Studio Agenturbüro Studio Agenturbüro

⏏︎ / Archive / 2022 / exclude-from

Using exclude-from-lists when syncing, zipping or versioning

Date: 2022-09-22
Update: 2026-07-02

System files on MacOS

Note that everything except .DS_Store meta is specific files for backup volumes or usually found on volume root.

.DS_Store

.Spotlight-V100
.DocumentRevisions-V100
.PKInstallSandboxManager
.VolumeIcon.icns
.TemporaryItems
.Trashes
.com.apple.timemachine.supported
.com.apple.timemachine.donotpresent
.fseventsd

other systems?

Please let us know what other ignore-lists you're using!

A global .gitignore

You can set this to any file like this

git config --global core.excludesfile ~/.config/gitignore_global.txt

rsync

Don't include system files in backups:

 rsync -av --exclude-from=~/.config/exclude-from.txt public/* file-dumps/latest

It has an include-from parameter, too:

rsync -av --include-from="rsync-include.txt" --exclude-from=~/.config/exclude-from.txt public/* file-dumps/latest

tar

Clean ZIPs:

tar -cz --exclude-from=~/.config/exclude-from.txt -f my-archive.tar.gz directory

Tip

For dotfiles/home dir hygiene, you should resolve to using the XDG spec or .meta when saving global config.




© 2020–25 Studio Agenturbüro — contact@studioagenturbuero.comimprint, privacy policy, credits.