Last active
August 29, 2015 14:01
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
.Trashes | |
Thumbs.db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment