Re: [Hampshire] Periodic filesystem checks

Top Page

Reply to this message
Author: Keith Edmunds
Date:  
To: hampshire
Subject: Re: [Hampshire] Periodic filesystem checks
I put this command together to find out whether the checks would run if
the system were rebooted. It isn't perfect - patches welcome! - but it
does the job.

for a in $(fdisk -l 2>/dev/null|grep -v Extended|\
    grep ^/|awk '{print $1}');do echo "$a:";dumpe2fs -h $a 2>&1|\
    grep -v 'Bad magic number'|\
    egrep '(^Mount count:|Maximum mount count:|Next check after:)';echo;done


Needs to be run as root; maybe it's helpful to someone.

--
Keith Edmunds

+-------------------------------------------------------------------------+
|    Tiger Computing Ltd    |  Helping businesses make the most of Linux  |
|  "The Linux Specialists"  |       http://www.tiger-computing.co.uk      |

+-------------------------------------------------------------------------+