UTMP

Section: User Commands (1)
Index Return to Main Contents
 

NAME

utmp - translate between binary and textual utmp files  

SYNOPSIS

utmp [-v] [filename]  

DESCRIPTION

utmp is useful for fixing a corrupted /etc/utmp file. Use utmp to obtain a printable representation of the file. Edit it, and then use utmp again to translate it back into binary form.

utmp reads from the given file, or stdin if none is given (/etc/utmp if stdin is a tty), and writes to stdout. It detects automatically which transformation to apply.

The flag -v indicates that times are to be printed in a human-comprehensible form. Note that this output format is not currently inverted, so it is not useful for making repairs.

If utmp is working correctly then

$ utmp

and

$ utmp | utmp | utmp

should produce the same output. Ideally

$ utmp | utmp | cmp - /etc/utmp

should produce no output, but some systems don't fill the entire unused part of the character fields with NULs.  

CAVEATS

I encourage system administrators to install this command somewhere besides /etc.

There are probably /etc/utmp formats I do not yet accomodate.  

FILES

/etc/utmp
/etc/wtmp  

SEE ALSO

who(1), (SysV) utmp(4), (BSD) utmp(5)  

AUTHOR

DaviD W. Sanderson     (dws@cs.wisc.edu)
 

COPYRIGHT


(C) Copyright 1991 by DaviD W. Sanderson (but freely redistributable)


 

Index

NAME
SYNOPSIS
DESCRIPTION
CAVEATS
FILES
SEE ALSO
AUTHOR
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 06:17:20 GMT, December 12, 2024