Skip to content

Instantly share code, notes, and snippets.

@lexrus lexrus/rmsenseless.sh
Last active Jun 20, 2019

Embed
What would you like to do?
Remove senseless files from my NAS
#!/bin/bash
find . -name '*.DS_Store' -type f -delete;
find . -name 'Thumbs.db' -type f -delete;
find . -name '*.swp' -type f -delete;
find . -name '*.AppleDouble' -exec rm -rf {} \;
find . -name ".AppleDouble" -print0 | xargs -0 rm -rf;
find . -name ".TemporaryItems" -print0 | xargs -0 rm -rf;
find . -name ".Trashes" -print0 | xargs -0 rm -rf;
find . -name ".afpdeleted*" -print0 | xargs -0 rm -rf;
@marco-schmidt

This comment has been minimized.

Copy link

marco-schmidt commented Jun 20, 2019

For me it needs to be .afpDeleted* (with an upper-case D) to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.