Hi Peter,

> Hardinfo gives me a list of every time I have booted the computer, and
> as I turn it off every night it's quite a long list. Anybody know how
> to clean out that list?

I'd use last(1) for that and
https://github.com/hardinfo2/hardinfo2/blob/master/modules/computer/boots.c,
which may be similar to the code you're running, does too.  It runs
‘last -Fw’ and looks for ‘system boot’.

Perhaps you have ‘force all details’ turned on so get a long list,
or the version you're running doesn't otherwise have the limit of
twenty entries.

last(1) points to wtmp(5).  You'll probably find /var/log/wtmp* matches
more than one file which suggests something on your system is rotating
the current one out of the way occasionally to create a new one.

Here, /etc/logrotate.conf has

    /var/log/wtmp {
        monthly
        create 0664 root utmp
        minsize 1M
        rotate 1
    }

but your system may do it differently.

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2025-02-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  https://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to