Skip to content

Instantly share code, notes, and snippets.

@lesstif
Forked from apisznasdin/rsync exclude
Last active August 20, 2018 09:20
Show Gist options
  • Save lesstif/43ac08114c97a52cb8db416fa4ad7252 to your computer and use it in GitHub Desktop.
Save lesstif/43ac08114c97a52cb8db416fa4ad7252 to your computer and use it in GitHub Desktop.
rsync all exclude recybled bin and thumbnail data
#!/bin/bash -x
rsync -ah --progress
--exclude='$RECYCLE.BIN' --exclude='$Recycle.Bin' --exclude='.AppleDB' --exclude='.AppleDesktop' \
--exclude='.AppleDouble' --exclude='.com.apple.timemachine.supported' --exclude='.dbfseventsd' \
--exclude='.DocumentRevisions-V100*' --exclude='.DS_Store' --exclude='.fseventsd' --exclude='.PKInstallSandboxManager' \
--exclude='.Spotlight*' --exclude='.SymAV*' --exclude='.symSchedScanLockxz' --exclude='.TemporaryItems' \
--exclude='.Trash*' --exclude='.vol' --exclude='.VolumeIcon.icns' --exclude='Desktop DB' --exclude='Desktop DF' \
--exclude='hiberfil.sys' --exclude='lost+found' --exclude='Network Trash Folder' --exclude='pagefile.sys' \
--exclude='Recycled' --exclude='RECYCLER' --exclude='System Volume Information' --exclude='Temporary Items' --exclude='Thumbs.db' \
source destination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment