file system mount and umount timestamps?

JB jb.1234abcd at gmail.com
Wed Dec 15 23:14:47 UTC 2010


gerrynix <gerrynix <at> yahoo.com> writes:

> 
> gerrynix <gerrynix <at> yahoo.com> writes:
>  
> > I get 'last mounted' time from the super block using 'tune2fs -l' although
> > there are likely other ways such as dumpe2fs. . . I have not found how to 
> > determine 
> > the 'last umount' timestamp. I suppose it registers somewhere. I've dug and 
> > googled but have 'nada' for my efforts. Any ideas/knowledge are welcomed. . 
> > Thnx
> 
> If you are really in need of "anything", then you can use shell alias,
> function,
> script, etc and thru mount/umount substitution, inclusion of 'date' output, 
> and
> saving the result somewhere (e.g. /var/log/mount.log), to achieve it.
> JB
> 
> Well yes JB. That works out fine. However, I specifically seek a native Linux 
> command, or location of kernel or filesystem register where the info is 
> stored. 
> I believe there's no way the timestamp is not stored. I need to avoid kludgy 
> solutions whenever possible. Many thanks.
> 
> ailing list
> users <at> lists.fedoraproject.org
> To unsubscribe or change subscription options:
> https://admin.fedoraproject.org/mailman/listinfo/users
> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
> 

I understand.
One more thing - I do not know what shell you use, but bash has an ability to
store entry's time stamp in its history file, that can be made pretty much
protected by you (man bash; HISTTIMEFORMAT).

You can also examine the source code of mount/umount in
$ rpm -qf /bin/mount
util-linux-ng-2.18-4.6.fc14.i686
to discover if time stamp is indeed stored somewhere.

JB




More information about the users mailing list