Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The manpage of logwatch says:

The format of the range option is: --range "date_range [period]"

Parameter date_range (and optional period) must be enclosed in quotes if it is ...


--range today --range yesterday --range '4 hours ago for that hour' --range '-3 days' --range 'since 2 hours ago for those hours' --range 'between -10 days and -2 days' --range 'Apr 15, 2005' --range 'first Monday in May' --range 'between 4/23/2005 and 4/30/2005' --range '2005/05/03 10:24:17 for that second'

but none of those options work on my Debian Squeeze machine.

How do you use the --range option correctly?

share|improve this question
The examples are already given by you. What exactly do you want? – devnull Apr 9 '13 at 8:02
up vote 1 down vote accepted

I found out myself:

if you scroll up the output after you try to call logwatch with --range, you see at the start:

ERROR: Range '4 hours ago for that hour' not understood

This system does not have Date::Manip module loaded, and therefore the only valid --range parameters are 'yesterday', 'today', or 'all'. The Date::Manip module can be installed by using either of:

apt-get install libdate-manip-perl
cpan -i 'Date::Manip'
perl -MCPAN -e 'install Date::Manip'

this takes quite a while to install, but then it works

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.