Skip to content

Instantly share code, notes, and snippets.

@lidio601
Last active August 29, 2015 14:01
Show Gist options
  • Save lidio601/bb7226958f6755a34cfd to your computer and use it in GitHub Desktop.
Save lidio601/bb7226958f6755a34cfd to your computer and use it in GitHub Desktop.
Linux System clean. This script was intended to remove certain dirty file likes: temporary files, Thumbs.db windows files, etc.. It results a little bit dangerous
#!/bin/bash
updatedb;
for remove in `cat pattern_file_list.txt`; do
for file in `locate $remove | grep "$remove$"`; do
rm -v \"$file\"
done
done
.DS_Store
.Trashes
Thumbs.db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment