background preloader

Admin

Facebook Twitter

Add Jobs To cron Under Linux or UNIX? Oneliner scripts. Have you ever wanted to verify/search for a running process? Or, have you ever wanted to see if you had multiple counts of the same process, possibly indicating orphans or hung processes? It's rather easy! As an example, assuming you are logged in as root or su'd, and looking for snort: The " " command will invert the selection for lines matching "grep"....so it will print ONLY lines that do not contain "grep". Why is this important? - the line containing the actual results for the real snort process - the line containing the grep action(s) So, assuming that you have only snort running, and running only once, this command would return one line, showing the snort process information (including startup arguments...yay!) But what if you need to count how many processes? This will return an integer value of the number of processes containing snort in the return of the ps command.

It's important to note that this DOES count/show EVERY line of the output that contains "snort". Debian GNU/Linux. Serveur de sauvegarde BackupPC Matthieu Vogelweith 17 août 2009 L’objectif de ce document est de détailler l’installation d’un serveur sauvegarde BackupPc [1] sous Debian Lenny [2].

Debian GNU/Linux

Ce document a été rédigé en LaTeX en utilisant l’excellent Vim sous Debian GNU/Linux. Il est disponible aux formats XHTML et PDF. Automate Linux with Cron and Anacron. How's your Greek?

Automate Linux with Cron and Anacron

Did you know that Χρόνος (chronos) means 'time'? Sure you did! And in Greek mythology, Chronos was the god of the ages, the personification of time. Hence we have words like chronometer and chronology. Given that programmers have never been famous for being that great at spelling, we also have Cron – a Linux service that arranges for actions to take place at specific times. In this tutorial you'll learn how to configure Cron to schedule your own jobs, and how to make sense of the Cron configuration that comes with your Linux distribution. Some uses for Cron Rotating log files (for more details about this, see the Log File Lumberjack feature on page 56 of LXF92, May 2007).Summarising log files using tools such as Logwatch and Webalizer.Automatically checking distro package repositories for updates.Rebuilding the slocate database.

Mastering Cron Cron has been around a long time (though not quite so long as Chronos). Indeed, people get quite inventive about using Cron.