scripts in /mnt/data/SYS/scripts/scripts.bash/2.maintenance/
kbsc in AK
have a look a bleachbit and compare with what you want
clean log files
TODO
/home/ward/.config/FreeFileSync/Logs
look for folders qwith hugh sizes and/or hugh number of files ( could be a log file location)
see disk tools
clean browser cache
clean FF e cookies
rm ~/.mozilla/firefox/*.default/cookies.sqlite
clean cache
rm ~/.mozilla/firefox/*.default/*.sqlite ~/.mozilla/firefox/*default/sessionstore.js
rm -r ~/.cache/mozilla/firefox/*.default/*
you can make a backup of these files
mkdir -p ~/.mozilla/firefox/backup ~/.cache/mozilla/firefox/backup
mv ~/.mozilla/firefox/*.default/*.sqlite ~/.mozilla/firefox/backup
mv ~/.mozilla/firefox/*.default/sessionstore.js ~/.mozilla/firefox/backup
mv ~/.cache/mozilla/firefox/*.default/* ~/.cache/mozilla/firefox/backup
clean recent files
=> os , libre office , editors : xed , npqq , kate , etc
- GNOME
in~/.local/share/recently-used.xbel. (or rather,${XDG_DATA_HOME}/recently-used.xbel),
script to extract the data ( ‘/mnt/data/SYS/scripts/scripts.bash/1. actions/extract-gnome-recen-filest.sh’ )
#!/bin/sh
set -e
mkdir -p ~/recent
rm -f ~/recent/* # Make sure you don’t have anything you care about here
# requires xmlstarlet to be installed
xmlstarlet sel -t -m '/xbel/bookmark[starts-with(@href, "file://")]' \
-v 'substring(@href, 8)' -n ${XDG_DATA_HOME:-~/.local/share}/recently-used.xbel |
python -c "import sys, urllib as ul;
sys.stdout.write(ul.unquote(sys.stdin.read().replace('\n', '\0')));" |
xargs -0 ln -st ~/recent
TODO error =>
line 8: python: command not found
ln: missing file operand
Try ‘ln –help’ for more information.
- LibreOffice
? in /home/ward/.config/libreoffice/4/user/registrymodifications.xcu (XML , and quite complex document)
? script to delete the entire recent history. It searches for and removes tags of the form:<item ...HistoryInfo> ... </item>
xmlstarlet
https://en.wikipedia.org/wiki/XMLStarlet
sudo apt-get install xmlstarlet
clean trash can
rm -rf ~/.local/share/Trash/*
#-- or
sudo apt install trash-cli
trash-empty
clean shell history
> ~/.bash_history