#!/bin/sh ## ## SCRIPT: 00_fileCLeanup_ver2_RunInTerminal.sh in $HOME/Rsync ## ## PURPOSE: This script is called by script '00_fileCLeanup_ver2.sh' --- ## to remove junk files --- especially files in the user's home ## directory --- such as thumbnail files in $HOME/.thumbnails/normal ## and in the 'cache' and 'Crash Report' directories of a web browser. ## ## HOW TO USE: Called from within script '00_fileCLeanup_ver2.sh', which is ## typically used at computer shutdown, via a desktop icon, ## just before using a desktop icon to backup the home directory ## via an 'rsync' script. ## ## Created: 2012sep29 ## Changed: 2012 set -x ## FOR SEAMONKEY: ## To get around problems caused by space in 'Crash Reports', ## putting quotes around just that subdir name WORKS. rm $HOME/.mozilla/seamonkey/"Crash Reports"/pending/* ## THIS ALSO WORKS (escape the space): # rm $HOME/.mozilla/seamonkey/Crash\ Reports/pending/* ## WE COULD ALSO USE 'find' INSTEAD: # find "$HOME/.mozilla/seamonkey/Crash Reports/pending/" \ # -type f -name '*' -print -exec rm {} \; ## FOR TESTING: # read PRESS_ANY_KEY_toContinue # exit set - echo "" set -x rm -R $HOME/.mozilla/seamonkey/72w3qd2h.default/minidumps/* set - echo "" set -x # rm $HOME/.mozilla/seamonkey/72w3qd2h.default/Cache/*/* rm -R $HOME/.mozilla/seamonkey/72w3qd2h.default/Cache/* set - echo "" set -x rm -R $HOME/.mozilla/seamonkey/72w3qd2h.default/Cache.Trash* ## FOR FIREFOX: set - echo "" set -x rm $HOME/.mozilla/firefox/ysz2tqya.default/Cache/* ## FOR OLD SEAMONKEY (1.x): set - echo "" set -x rm $HOME/.seamonkey/default/Cache/* ## FOR GNOME THUMBNAILS: set - echo "" set -x rm $HOME/.thumbnails/normal/* set - echo "" set -x rm $HOME/.thumbnails/large/* ## Macromedia (flash) junk follows - really obnoxious. set - echo "" set -x rm -R $HOME/.macromedia/Flash_Player/macromedia.com/support/flashplayer/sys/* set - echo "" set -x rm -R $HOME/.macromedia/Flash_Player/\#SharedObjects/* ## The escaped '#' in '#SharedObjects' is needed to avoid removing ## 'Flash_Player', cause the '#' makes a comment of the following chars. set - echo "" set -x rm -R $HOME/.adobe/Flash_Player/AssetCache/* set - echo "" set -x read PRESS_ANY_KEY_toContinue set - ls -R $HOME/.mozilla/seamonkey/72w3qd2h.default/ ls -R $HOME/.mozilla/firefox/ysz2tqya.default/ ls -R $HOME/.thumbnails/ ls -R $HOME/.adobe/Flash_Player/ set -x read PRESS_ANY_KEY_toContinue