]>
Commit | Line | Data |
---|---|---|
78d5ceac KZ |
1 | .\" Copyright (C) 2010 Michael Krapp |
2 | .\" | |
3 | .\" This program is free software; you can redistribute it and/or modify | |
38e3e66f | 4 | .\" it under the terms of the GNU General Public License as published by |
78d5ceac KZ |
5 | .\" the Free Software Foundation; either version 2 of the License, or |
6 | .\" (at your option) any later version. | |
7 | .\" | |
8 | .\" This program is distributed in the hope that it will be useful, | |
9 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
38e3e66f | 10 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
78d5ceac KZ |
11 | .\" GNU General Public License for more details. |
12 | .\" | |
13 | .\" You should have received a copy of the GNU General Public License | |
14 | .\" along with this program; if not, write to the Free Software | |
15 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
16 | .\" | |
75ca43bb | 17 | .TH UTMPDUMP 1 "July 2014" "util-linux" "User Commands" |
78d5ceac KZ |
18 | .SH NAME |
19 | utmpdump \- dump UTMP and WTMP files in raw format | |
20 | .SH SYNOPSIS | |
1000a595 BS |
21 | .BR utmpdump " [options]" |
22 | .RI [ filename ] | |
78d5ceac | 23 | .SH DESCRIPTION |
ea4ca239 SK |
24 | .B utmpdump |
25 | is a simple program to dump UTMP and WTMP files in raw format, so they | |
26 | can be examined. | |
27 | .B utmpdump | |
38e3e66f | 28 | reads from stdin unless a |
4810de91 BV |
29 | .I filename |
30 | is passed. | |
78d5ceac | 31 | .SH OPTIONS |
75ca43bb BS |
32 | .TP |
33 | .BR \-f , " \-\-follow" | |
ea4ca239 | 34 | Output appended data as the file grows. |
75ca43bb BS |
35 | .TP |
36 | .BR \-o , " \-\-output " \fIfile | |
38e3e66f | 37 | Write command output to \fIfile\fR instead of standard output. |
75ca43bb BS |
38 | .TP |
39 | .BR \-r , " \-\-reverse" | |
1000a595 | 40 | Undump, write back edited login information into the utmp or wtmp files. |
75ca43bb BS |
41 | .TP |
42 | .BR \-V , " \-\-version" | |
b4362b6f | 43 | Display version information and exit. |
75ca43bb BS |
44 | .TP |
45 | .BR \-h , " \-\-help" | |
46 | Display help text and exit. | |
9e15c93d | 47 | .SH NOTES |
ea4ca239 SK |
48 | .B utmpdump |
49 | can be useful in cases of corrupted utmp or wtmp entries. It can dump | |
1000a595 BS |
50 | out utmp/wtmp to an ASCII file, which can then be edited to remove |
51 | bogus entries, and reintegrated using: | |
38e3e66f | 52 | .PP |
ea4ca239 | 53 | .RS |
1c4c6024 | 54 | .B utmpdump \-r < ascii_file > wtmp |
ea4ca239 SK |
55 | .RE |
56 | .PP | |
1000a595 | 57 | But be warned, |
78d5ceac | 58 | .B utmpdump |
38e3e66f | 59 | was written for debugging purposes only. |
3d47107d SK |
60 | .SS File formats |
61 | .PP | |
7a40136c | 62 | Only the binary version of the |
3d47107d SK |
63 | .BR utmp (5) |
64 | is standardised. Textual dumps may become incompatible in future. | |
65 | .PP | |
66 | The version 2.28 was the last one that printed text output using | |
67 | .BR ctime (3) | |
68 | timestamp format. Newer dumps use millisecond precision ISO-8601 timestamp | |
69 | format in UTC-0 timezone. Conversion from former timestamp format can be | |
70 | made to binary, although attempt to do so can lead the timestamps to drift | |
71 | amount of timezone offset. | |
78d5ceac KZ |
72 | .SH BUGS |
73 | You may | |
74 | .B not | |
38e3e66f | 75 | use the |
ea4ca239 | 76 | .B \-r |
38e3e66f | 77 | option, as the format for the utmp/wtmp files strongly depends on the input |
ea4ca239 | 78 | format. This tool was |
78d5ceac | 79 | .B not |
38e3e66f | 80 | written for normal use, but for debugging only. |
78d5ceac KZ |
81 | .SH AUTHOR |
82 | Michael Krapp | |
5a829806 | 83 | .SH SEE ALSO |
78d5ceac KZ |
84 | .BR last (1), |
85 | .BR w (1), | |
86 | .BR who (1), | |
ea4ca239 SK |
87 | .BR utmp (5) |
88 | .SH AVAILABILITY | |
89 | The utmpdump command is part of the util-linux package and is available | |
90 | from | |
d673b74e | 91 | .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/ |
ea4ca239 SK |
92 | Linux Kernel Archive |
93 | .UE . |