From bd56e5fc0597c2a71b0810657298e201a5f2c95e Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 28 Aug 2010 17:08:31 +0200 Subject: add script that cleans $HOME from some stupid files --- .scripts/cleanup-homedir.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .scripts/cleanup-homedir.sh (limited to '.scripts') diff --git a/.scripts/cleanup-homedir.sh b/.scripts/cleanup-homedir.sh new file mode 100644 index 0000000..3764ff9 --- /dev/null +++ b/.scripts/cleanup-homedir.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# remove vim swap files +find $HOME -maxdepth 1 -type f -name '.sv*' -exec rm {} \; + +pids=$(pgrep startx) +ls -1 $HOME/.serverauth.* | grep -v ${pids/ /\\|} | while read file; do + rm "${file}" +done + +rm $HOME/.xsession-errors* + +# xsession manager files (maybe obsolete) +rm $HOME/.xsm* -- cgit