Archive

Archive for June, 2006

HOWTO Use the /etc/cron.* infrastructure on Debian

June 26, 2006 Leave a comment
This article is incomplete and was first written in June 2006
for the BeezNest technical website (http://glasnost.beeznest.org/articles/339).

On Debian, an infrastructure is in place in directories /etc/cron.* to extend and improve the crontabs.

Why ?

Usually, crontabs are managed at the user level, which can start crontab -e to edit its own or crontab -l to just list it. This is often not practical and uneasy to manage, because it is hard to search, you cannot keep an history, and you cannot split it in an applications- or whatever-way.

/etc/cron.*

So, the infrastructure composed of /etc/cron.d/, /etc/cron.daily/, /etc/cron.weekly/ and /etc/cron.monthly/ is a solution. As we use directly the filesystem as storage, you gain the abilities to:

  • search easily in those cronjobs stored there, using greps or finds
  • keep an history, or simply a date of last modification
  • split cronjobs in as many scripts or crontab entries as you want

Scripts in those directories whose names include a dot (.) will be ignored.

How ?

As simple (even more) as crontabs, because format of scripts in /etc/cron.d/ is identical to crontabs while in the others /etc/cron.*/, there are regular scripts because the system already knows when to run them based on the name of the directory they belong to.

Behind the scene

All this is made possible because of file /etc/crontab, which in turn executes the scripts in /etc/cron.*/. It even supports anacron out-of-the-box.

Categories: English, Tech Crunch Tags: , ,

HOWTO Automatically clean thumbnails generated by Nautilus

June 18, 2006 Leave a comment
This article is incomplete and was first written in June 2006
for the BeezNest technical website (http://glasnost.beeznest.org/articles/338).

To automatically clean the thumbnails generated by Nautilus, and who never get cleaned by GNOME itself and can really fast occupy a large part of your disk space, I setup a cronjob like this in /etc/cron.d/clean-gnome-thumbnails on my Debian:

#
# Clean GNOME thumbnails files
#
# Every day, at 22h.
0 22    * * *   root    find /home/*/.thumbnails/ -type f -atime +90 -exec rm {} \;

This cronjob would remove thumbnails older than 90 days from homes of all users on my machine every day at 10PM.

Categories: English, Tech Crunch Tags: ,

Upgrading from Sarge to Etch

June 2, 2006 Leave a comment
This article is incomplete and was first written in June 2006 
for the BeezNest technical website (http://glasnost.beeznest.org/articles/336).

This is a procedure to upgrade a Debian Sarge GNOME Desktop PC to Debian Etch.

First, make sure you are not using devfs. If you are using udev, or no device manager daemon, then you are ready. Also, I did not test upgrade from a 2.4 kernel, only 2.6 to 2.6.

Make sure all your packages belong to well-known apt sources, otherwise, you will probably have to fix things by hands later. apt-show-versions is a tool that could be helpful for this.

Replace all occurences to sarge (or stable) in /etc/apt/sources.list by etch.

# apt-get update

The first tricky part is to get kernel and udev working fine. Hope you don’t have any third-party kernel module needed for the upgrade (wifi driver?). Any module included officially in the kernel will do, though.

Preferably stop all of your running applications, logoff, and stop gdm (you’re using gdm, right?). Then:

# touch /etc/udev/kernel-upgrade
# apt-get install udev initramfs-tools linux-image-2.6-686
# apt-get install modutils module-init-tools apt aptitude tasksel

As you’ve just upgraded apt, rerun an apt-get update before continuing.Remove the hotplug, modutils and base-config packages, they are no longer used

# dpkg -P hotplug modutils base-config
# apt-get install gnome-volume-manager
Categories: English, Tech Crunch Tags: , ,
%d bloggers like this: