You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

zdila

Beginner

  • "zdila" started this thread

Posts: 3

Location: Slovakia (SK), Kosice (KE)

Occupation: Developer / Analyst

  • Send private message

1

Friday, June 17th 2005, 7:38am

.desktop files cleanup script

Hi all

I've made a .desktop files cleanup script that moves all .desktop files having invalid Exec= to a backup directory. Run as root:

Source code

1
2
3
4
mkdir /backup

IFS="
"; for i in `find / -name '*.desktop'`; do grep -q '^Exec=' "$i" && (which `sed -n 's/^Exec=\([^ ]*\).*/\1/p' "$i"` > /dev/null || (mkdir -p /backup/${i%`basename $i`}; mv "$i" /backup$i)); done


But remember I take no responsibility for possible harm caused by this script.
Enjoy.

PS: Hope I didn't discover a warm water :-)
Martin