Remove all files but one with rm

Is there any way to remove all of the files in a directory except for one with a certain filename? For instance, if I had a directory containing the files file1, file2, and dontdelete. Would there be any way to quickly delete file1, and file2 and not dontdelete? I know that I could just do…

[How-to] Make nVidia settings persistent and retain the settings in Ubuntu 9.10 Karmic Koala

Nvidia Proprietary Drivers need nvidia-settings to set screen resolution and change other settings. In previous versions of Ubuntu and in other distros to make them permanent (used in every session) you click the “Save to X configuration file”. From Karmic on there is no xorg.conf by default! As a result, nvidia-settings is not able to…

[How-to] Fix “E: Unable to parse package file /var/lib/apt/extended_states (1)” error in Synaptic or apt-get

This is just a quick tip. If you are getting this error message in Synaptic: E: Unable to parse package file /var/lib/apt/extended_states (1) E: _cache->open() failed, please report or this error in apt-get in command line: Reading package lists… Done Building dependency tree Reading state information… Error! E: Unable to parse package file /var/lib/apt/extended_states (1)…