Explanation for the meaning of content of the /var/run/utmp file
Clash Royale CLAN TAG#URR8PPP
up vote
5
down vote
favorite
I would like to understand the content of the following file system /var/run/utmp
. When I use the command od
to open it I see the following:
[john@iceman ~]$ od -c /var/run/utmp
0000000 002 ~
0000020
0000040 ~ ~ r e b o
0000060 o t
0000100 3 . 1 0
0000120 . 0 - 6 9 3 . 1 1 . 1 . e l 7 .
0000140 x 8 6 _ 6 4
0000160
What these numbers/characters means? In which coding system it was written? and how can it be translated into a meaningful text?
files login od
add a comment |Â
up vote
5
down vote
favorite
I would like to understand the content of the following file system /var/run/utmp
. When I use the command od
to open it I see the following:
[john@iceman ~]$ od -c /var/run/utmp
0000000 002 ~
0000020
0000040 ~ ~ r e b o
0000060 o t
0000100 3 . 1 0
0000120 . 0 - 6 9 3 . 1 1 . 1 . e l 7 .
0000140 x 8 6 _ 6 4
0000160
What these numbers/characters means? In which coding system it was written? and how can it be translated into a meaningful text?
files login od
3
man od would tell you the proper answer: the characters are by default in ASCII.
– Thomas Dickey
Sep 1 at 14:49
2
Have you readman od
?
– mattia.b89
Sep 1 at 14:50
2
Yes, but it is still not clear. For instance, what is the meaning of the letters r, e, b, l, t. What is the meaning of the numbers 0,1,9, … etc. What is the meaning of the characters?
– Kasper
Sep 1 at 14:53
1
Those are literally the ASCII characters stored in the file. Not all of the bytes are printable characters. For the format, do man utmp.
– Thomas Dickey
Sep 1 at 14:57
add a comment |Â
up vote
5
down vote
favorite
up vote
5
down vote
favorite
I would like to understand the content of the following file system /var/run/utmp
. When I use the command od
to open it I see the following:
[john@iceman ~]$ od -c /var/run/utmp
0000000 002 ~
0000020
0000040 ~ ~ r e b o
0000060 o t
0000100 3 . 1 0
0000120 . 0 - 6 9 3 . 1 1 . 1 . e l 7 .
0000140 x 8 6 _ 6 4
0000160
What these numbers/characters means? In which coding system it was written? and how can it be translated into a meaningful text?
files login od
I would like to understand the content of the following file system /var/run/utmp
. When I use the command od
to open it I see the following:
[john@iceman ~]$ od -c /var/run/utmp
0000000 002 ~
0000020
0000040 ~ ~ r e b o
0000060 o t
0000100 3 . 1 0
0000120 . 0 - 6 9 3 . 1 1 . 1 . e l 7 .
0000140 x 8 6 _ 6 4
0000160
What these numbers/characters means? In which coding system it was written? and how can it be translated into a meaningful text?
files login od
edited Sep 1 at 15:57


Jeff Schaller
32.1k849109
32.1k849109
asked Sep 1 at 14:48
Kasper
12611
12611
3
man od would tell you the proper answer: the characters are by default in ASCII.
– Thomas Dickey
Sep 1 at 14:49
2
Have you readman od
?
– mattia.b89
Sep 1 at 14:50
2
Yes, but it is still not clear. For instance, what is the meaning of the letters r, e, b, l, t. What is the meaning of the numbers 0,1,9, … etc. What is the meaning of the characters?
– Kasper
Sep 1 at 14:53
1
Those are literally the ASCII characters stored in the file. Not all of the bytes are printable characters. For the format, do man utmp.
– Thomas Dickey
Sep 1 at 14:57
add a comment |Â
3
man od would tell you the proper answer: the characters are by default in ASCII.
– Thomas Dickey
Sep 1 at 14:49
2
Have you readman od
?
– mattia.b89
Sep 1 at 14:50
2
Yes, but it is still not clear. For instance, what is the meaning of the letters r, e, b, l, t. What is the meaning of the numbers 0,1,9, … etc. What is the meaning of the characters?
– Kasper
Sep 1 at 14:53
1
Those are literally the ASCII characters stored in the file. Not all of the bytes are printable characters. For the format, do man utmp.
– Thomas Dickey
Sep 1 at 14:57
3
3
man od would tell you the proper answer: the characters are by default in ASCII.
– Thomas Dickey
Sep 1 at 14:49
man od would tell you the proper answer: the characters are by default in ASCII.
– Thomas Dickey
Sep 1 at 14:49
2
2
Have you read
man od
?– mattia.b89
Sep 1 at 14:50
Have you read
man od
?– mattia.b89
Sep 1 at 14:50
2
2
Yes, but it is still not clear. For instance, what is the meaning of the letters r, e, b, l, t. What is the meaning of the numbers 0,1,9, … etc. What is the meaning of the characters?
– Kasper
Sep 1 at 14:53
Yes, but it is still not clear. For instance, what is the meaning of the letters r, e, b, l, t. What is the meaning of the numbers 0,1,9, … etc. What is the meaning of the characters?
– Kasper
Sep 1 at 14:53
1
1
Those are literally the ASCII characters stored in the file. Not all of the bytes are printable characters. For the format, do man utmp.
– Thomas Dickey
Sep 1 at 14:57
Those are literally the ASCII characters stored in the file. Not all of the bytes are printable characters. For the format, do man utmp.
– Thomas Dickey
Sep 1 at 14:57
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
5
down vote
The text files only contain characters, whereas binary files contain all possible character values, including the control characters
The command od
with the flag -c
(od stands for octal dump
), displays files containing control characters.
When displaying a binary file to the screen, the control characters within the file can set undesirable modes for the workstation and can cause the output to appear not clear (i.e. gibberish), and even it may cause the workstation to stop responding. In order to find clues into the binary file (i.e. displaying it in a safe way), we can use commands cat
, od
or hexdump
.
The command cat -v
which will make the control characters visible in a safe way and won't put the screen into any strange modes. This command represents each control character by a Caret (^) and the corresponding printable character.
The command od
stands for octal dump and it displays every word of a file or pipeline in octal using the base eight numbering system
. For example, the command od
would show the system file /var/run/utmp
as follows:
$ od /var/run/utmp
0000000 000002 000000 000000 000000 000176 000000 000000 000000
0000020 000000 000000 000000 000000 000000 000000 000000 000000
0000040 000000 000000 000000 000000 077176 000000 062562 067542
0000060 072157 000000 000000 000000 000000 000000 000000 000000
0000100 000000 000000 000000 000000 000000 000000 027063 030061
0000120 030056 033055 031471 030456 027061 027061 066145 027067
0000140 034170 057466 032066 000000 000000 000000 000000 000000
0000160 000000 000000 000000 000000 000000 000000 000000 000000
. . . .
. . . .
. . . .
. . . .
Now, adding the flag -b
(-b means select octal bytes) to the command od
will break each word into two bytes or characters. For example, the previous text will show as follows:
$ od -b /var/run/utmp
0000000 002 000 000 000 000 000 000 000 176 000 000 000 000 000 000 000
0000020 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
0000040 000 000 000 000 000 000 000 000 176 176 000 000 162 145 142 157
0000060 157 164 000 000 000 000 000 000 000 000 000 000 000 000 000 000
0000100 000 000 000 000 000 000 000 000 000 000 000 000 063 056 061 060
0000120 056 060 055 066 071 063 056 061 061 056 061 056 145 154 067 056
0000140 170 070 066 137 066 064 000 000 000 000 000 000 000 000 000 000
0000160 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
. . . .
. . . .
. . . .
. . . .
Accordant to ASCII(7)
man, lets match the numbers in the previous table with the ASCII:
000
meansnull
.002
meansstart of text
- in the first row, the number
176
represent he character~
and so on, every number is coded in ASCII(7)
table.
On the other side, adding the flag -c
(stands for select printable characters or backslash escapesto the command
od` will show any printable characters within the output. The same previous example will look as follows:
$ od -c /var/run/utmp
0000000 002 ~
0000020
0000040 ~ ~ r e b o
0000060 o t
0000100 3 . 1 0
0000120 . 0 - 6 9 3 . 1 1 . 1 . e l 7 .
0000140 x 8 6 _ 6 4
0000160
. . . .
. . . .
. . . .
. . . .
In order to translate the previous table to a meaningful text we can use
the command strings
which will find any strings of printable characters with a length about four characters or longer. For example, in the previous table:
Row <0000040> contain the lettersr e b o
.
Row <0000060> contain the letterso t
.
As a results, the commandstrings
would translate these letters into the word"reboot".
Similarly,
Row <0000100> contain3 . 1 0
.
Row <0000120> contain. 0 - 6 9 3 . 1 1 . 1 . e l 7 .
.
Row <0000140> containx 8 6 _ 6 4
.
The command string
would translate these three rows into "3.10.0-693.11.1.el7.x86_64"
$ strings /var/run/utmp
reboot
3.10.0-693.11.1.el7.x86_64
. . . .
. . . .
. . . .
. . . .
1
This is exactly what I wanted thank you so much!! ;-)
– Kasper
Sep 1 at 21:31
add a comment |Â
up vote
3
down vote
od -c /var/run/utmp
tries its best to output a meaningful text, printing the file char by char, in clear text where it can, and in a sort of binary / octal representation when it can't. You can influence od
's behaviour by setting several options. utmp
is a binary file with fixed records, and thus chances are low to actually read its contents without translation / interpretation / formatting.
1
Thanks! the command "who" reads the utmp file and output log onto information? How the command "who" interpret the coded utmp file?
– Kasper
Sep 1 at 15:07
1
It knows and interprets the structures and details.man utmp
:The file is a sequence of utmp structures, declared as follows in <utmp.h> . . .
– RudiC
Sep 1 at 15:14
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
The text files only contain characters, whereas binary files contain all possible character values, including the control characters
The command od
with the flag -c
(od stands for octal dump
), displays files containing control characters.
When displaying a binary file to the screen, the control characters within the file can set undesirable modes for the workstation and can cause the output to appear not clear (i.e. gibberish), and even it may cause the workstation to stop responding. In order to find clues into the binary file (i.e. displaying it in a safe way), we can use commands cat
, od
or hexdump
.
The command cat -v
which will make the control characters visible in a safe way and won't put the screen into any strange modes. This command represents each control character by a Caret (^) and the corresponding printable character.
The command od
stands for octal dump and it displays every word of a file or pipeline in octal using the base eight numbering system
. For example, the command od
would show the system file /var/run/utmp
as follows:
$ od /var/run/utmp
0000000 000002 000000 000000 000000 000176 000000 000000 000000
0000020 000000 000000 000000 000000 000000 000000 000000 000000
0000040 000000 000000 000000 000000 077176 000000 062562 067542
0000060 072157 000000 000000 000000 000000 000000 000000 000000
0000100 000000 000000 000000 000000 000000 000000 027063 030061
0000120 030056 033055 031471 030456 027061 027061 066145 027067
0000140 034170 057466 032066 000000 000000 000000 000000 000000
0000160 000000 000000 000000 000000 000000 000000 000000 000000
. . . .
. . . .
. . . .
. . . .
Now, adding the flag -b
(-b means select octal bytes) to the command od
will break each word into two bytes or characters. For example, the previous text will show as follows:
$ od -b /var/run/utmp
0000000 002 000 000 000 000 000 000 000 176 000 000 000 000 000 000 000
0000020 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
0000040 000 000 000 000 000 000 000 000 176 176 000 000 162 145 142 157
0000060 157 164 000 000 000 000 000 000 000 000 000 000 000 000 000 000
0000100 000 000 000 000 000 000 000 000 000 000 000 000 063 056 061 060
0000120 056 060 055 066 071 063 056 061 061 056 061 056 145 154 067 056
0000140 170 070 066 137 066 064 000 000 000 000 000 000 000 000 000 000
0000160 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
. . . .
. . . .
. . . .
. . . .
Accordant to ASCII(7)
man, lets match the numbers in the previous table with the ASCII:
000
meansnull
.002
meansstart of text
- in the first row, the number
176
represent he character~
and so on, every number is coded in ASCII(7)
table.
On the other side, adding the flag -c
(stands for select printable characters or backslash escapesto the command
od` will show any printable characters within the output. The same previous example will look as follows:
$ od -c /var/run/utmp
0000000 002 ~
0000020
0000040 ~ ~ r e b o
0000060 o t
0000100 3 . 1 0
0000120 . 0 - 6 9 3 . 1 1 . 1 . e l 7 .
0000140 x 8 6 _ 6 4
0000160
. . . .
. . . .
. . . .
. . . .
In order to translate the previous table to a meaningful text we can use
the command strings
which will find any strings of printable characters with a length about four characters or longer. For example, in the previous table:
Row <0000040> contain the lettersr e b o
.
Row <0000060> contain the letterso t
.
As a results, the commandstrings
would translate these letters into the word"reboot".
Similarly,
Row <0000100> contain3 . 1 0
.
Row <0000120> contain. 0 - 6 9 3 . 1 1 . 1 . e l 7 .
.
Row <0000140> containx 8 6 _ 6 4
.
The command string
would translate these three rows into "3.10.0-693.11.1.el7.x86_64"
$ strings /var/run/utmp
reboot
3.10.0-693.11.1.el7.x86_64
. . . .
. . . .
. . . .
. . . .
1
This is exactly what I wanted thank you so much!! ;-)
– Kasper
Sep 1 at 21:31
add a comment |Â
up vote
5
down vote
The text files only contain characters, whereas binary files contain all possible character values, including the control characters
The command od
with the flag -c
(od stands for octal dump
), displays files containing control characters.
When displaying a binary file to the screen, the control characters within the file can set undesirable modes for the workstation and can cause the output to appear not clear (i.e. gibberish), and even it may cause the workstation to stop responding. In order to find clues into the binary file (i.e. displaying it in a safe way), we can use commands cat
, od
or hexdump
.
The command cat -v
which will make the control characters visible in a safe way and won't put the screen into any strange modes. This command represents each control character by a Caret (^) and the corresponding printable character.
The command od
stands for octal dump and it displays every word of a file or pipeline in octal using the base eight numbering system
. For example, the command od
would show the system file /var/run/utmp
as follows:
$ od /var/run/utmp
0000000 000002 000000 000000 000000 000176 000000 000000 000000
0000020 000000 000000 000000 000000 000000 000000 000000 000000
0000040 000000 000000 000000 000000 077176 000000 062562 067542
0000060 072157 000000 000000 000000 000000 000000 000000 000000
0000100 000000 000000 000000 000000 000000 000000 027063 030061
0000120 030056 033055 031471 030456 027061 027061 066145 027067
0000140 034170 057466 032066 000000 000000 000000 000000 000000
0000160 000000 000000 000000 000000 000000 000000 000000 000000
. . . .
. . . .
. . . .
. . . .
Now, adding the flag -b
(-b means select octal bytes) to the command od
will break each word into two bytes or characters. For example, the previous text will show as follows:
$ od -b /var/run/utmp
0000000 002 000 000 000 000 000 000 000 176 000 000 000 000 000 000 000
0000020 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
0000040 000 000 000 000 000 000 000 000 176 176 000 000 162 145 142 157
0000060 157 164 000 000 000 000 000 000 000 000 000 000 000 000 000 000
0000100 000 000 000 000 000 000 000 000 000 000 000 000 063 056 061 060
0000120 056 060 055 066 071 063 056 061 061 056 061 056 145 154 067 056
0000140 170 070 066 137 066 064 000 000 000 000 000 000 000 000 000 000
0000160 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
. . . .
. . . .
. . . .
. . . .
Accordant to ASCII(7)
man, lets match the numbers in the previous table with the ASCII:
000
meansnull
.002
meansstart of text
- in the first row, the number
176
represent he character~
and so on, every number is coded in ASCII(7)
table.
On the other side, adding the flag -c
(stands for select printable characters or backslash escapesto the command
od` will show any printable characters within the output. The same previous example will look as follows:
$ od -c /var/run/utmp
0000000 002 ~
0000020
0000040 ~ ~ r e b o
0000060 o t
0000100 3 . 1 0
0000120 . 0 - 6 9 3 . 1 1 . 1 . e l 7 .
0000140 x 8 6 _ 6 4
0000160
. . . .
. . . .
. . . .
. . . .
In order to translate the previous table to a meaningful text we can use
the command strings
which will find any strings of printable characters with a length about four characters or longer. For example, in the previous table:
Row <0000040> contain the lettersr e b o
.
Row <0000060> contain the letterso t
.
As a results, the commandstrings
would translate these letters into the word"reboot".
Similarly,
Row <0000100> contain3 . 1 0
.
Row <0000120> contain. 0 - 6 9 3 . 1 1 . 1 . e l 7 .
.
Row <0000140> containx 8 6 _ 6 4
.
The command string
would translate these three rows into "3.10.0-693.11.1.el7.x86_64"
$ strings /var/run/utmp
reboot
3.10.0-693.11.1.el7.x86_64
. . . .
. . . .
. . . .
. . . .
1
This is exactly what I wanted thank you so much!! ;-)
– Kasper
Sep 1 at 21:31
add a comment |Â
up vote
5
down vote
up vote
5
down vote
The text files only contain characters, whereas binary files contain all possible character values, including the control characters
The command od
with the flag -c
(od stands for octal dump
), displays files containing control characters.
When displaying a binary file to the screen, the control characters within the file can set undesirable modes for the workstation and can cause the output to appear not clear (i.e. gibberish), and even it may cause the workstation to stop responding. In order to find clues into the binary file (i.e. displaying it in a safe way), we can use commands cat
, od
or hexdump
.
The command cat -v
which will make the control characters visible in a safe way and won't put the screen into any strange modes. This command represents each control character by a Caret (^) and the corresponding printable character.
The command od
stands for octal dump and it displays every word of a file or pipeline in octal using the base eight numbering system
. For example, the command od
would show the system file /var/run/utmp
as follows:
$ od /var/run/utmp
0000000 000002 000000 000000 000000 000176 000000 000000 000000
0000020 000000 000000 000000 000000 000000 000000 000000 000000
0000040 000000 000000 000000 000000 077176 000000 062562 067542
0000060 072157 000000 000000 000000 000000 000000 000000 000000
0000100 000000 000000 000000 000000 000000 000000 027063 030061
0000120 030056 033055 031471 030456 027061 027061 066145 027067
0000140 034170 057466 032066 000000 000000 000000 000000 000000
0000160 000000 000000 000000 000000 000000 000000 000000 000000
. . . .
. . . .
. . . .
. . . .
Now, adding the flag -b
(-b means select octal bytes) to the command od
will break each word into two bytes or characters. For example, the previous text will show as follows:
$ od -b /var/run/utmp
0000000 002 000 000 000 000 000 000 000 176 000 000 000 000 000 000 000
0000020 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
0000040 000 000 000 000 000 000 000 000 176 176 000 000 162 145 142 157
0000060 157 164 000 000 000 000 000 000 000 000 000 000 000 000 000 000
0000100 000 000 000 000 000 000 000 000 000 000 000 000 063 056 061 060
0000120 056 060 055 066 071 063 056 061 061 056 061 056 145 154 067 056
0000140 170 070 066 137 066 064 000 000 000 000 000 000 000 000 000 000
0000160 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
. . . .
. . . .
. . . .
. . . .
Accordant to ASCII(7)
man, lets match the numbers in the previous table with the ASCII:
000
meansnull
.002
meansstart of text
- in the first row, the number
176
represent he character~
and so on, every number is coded in ASCII(7)
table.
On the other side, adding the flag -c
(stands for select printable characters or backslash escapesto the command
od` will show any printable characters within the output. The same previous example will look as follows:
$ od -c /var/run/utmp
0000000 002 ~
0000020
0000040 ~ ~ r e b o
0000060 o t
0000100 3 . 1 0
0000120 . 0 - 6 9 3 . 1 1 . 1 . e l 7 .
0000140 x 8 6 _ 6 4
0000160
. . . .
. . . .
. . . .
. . . .
In order to translate the previous table to a meaningful text we can use
the command strings
which will find any strings of printable characters with a length about four characters or longer. For example, in the previous table:
Row <0000040> contain the lettersr e b o
.
Row <0000060> contain the letterso t
.
As a results, the commandstrings
would translate these letters into the word"reboot".
Similarly,
Row <0000100> contain3 . 1 0
.
Row <0000120> contain. 0 - 6 9 3 . 1 1 . 1 . e l 7 .
.
Row <0000140> containx 8 6 _ 6 4
.
The command string
would translate these three rows into "3.10.0-693.11.1.el7.x86_64"
$ strings /var/run/utmp
reboot
3.10.0-693.11.1.el7.x86_64
. . . .
. . . .
. . . .
. . . .
The text files only contain characters, whereas binary files contain all possible character values, including the control characters
The command od
with the flag -c
(od stands for octal dump
), displays files containing control characters.
When displaying a binary file to the screen, the control characters within the file can set undesirable modes for the workstation and can cause the output to appear not clear (i.e. gibberish), and even it may cause the workstation to stop responding. In order to find clues into the binary file (i.e. displaying it in a safe way), we can use commands cat
, od
or hexdump
.
The command cat -v
which will make the control characters visible in a safe way and won't put the screen into any strange modes. This command represents each control character by a Caret (^) and the corresponding printable character.
The command od
stands for octal dump and it displays every word of a file or pipeline in octal using the base eight numbering system
. For example, the command od
would show the system file /var/run/utmp
as follows:
$ od /var/run/utmp
0000000 000002 000000 000000 000000 000176 000000 000000 000000
0000020 000000 000000 000000 000000 000000 000000 000000 000000
0000040 000000 000000 000000 000000 077176 000000 062562 067542
0000060 072157 000000 000000 000000 000000 000000 000000 000000
0000100 000000 000000 000000 000000 000000 000000 027063 030061
0000120 030056 033055 031471 030456 027061 027061 066145 027067
0000140 034170 057466 032066 000000 000000 000000 000000 000000
0000160 000000 000000 000000 000000 000000 000000 000000 000000
. . . .
. . . .
. . . .
. . . .
Now, adding the flag -b
(-b means select octal bytes) to the command od
will break each word into two bytes or characters. For example, the previous text will show as follows:
$ od -b /var/run/utmp
0000000 002 000 000 000 000 000 000 000 176 000 000 000 000 000 000 000
0000020 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
0000040 000 000 000 000 000 000 000 000 176 176 000 000 162 145 142 157
0000060 157 164 000 000 000 000 000 000 000 000 000 000 000 000 000 000
0000100 000 000 000 000 000 000 000 000 000 000 000 000 063 056 061 060
0000120 056 060 055 066 071 063 056 061 061 056 061 056 145 154 067 056
0000140 170 070 066 137 066 064 000 000 000 000 000 000 000 000 000 000
0000160 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
. . . .
. . . .
. . . .
. . . .
Accordant to ASCII(7)
man, lets match the numbers in the previous table with the ASCII:
000
meansnull
.002
meansstart of text
- in the first row, the number
176
represent he character~
and so on, every number is coded in ASCII(7)
table.
On the other side, adding the flag -c
(stands for select printable characters or backslash escapesto the command
od` will show any printable characters within the output. The same previous example will look as follows:
$ od -c /var/run/utmp
0000000 002 ~
0000020
0000040 ~ ~ r e b o
0000060 o t
0000100 3 . 1 0
0000120 . 0 - 6 9 3 . 1 1 . 1 . e l 7 .
0000140 x 8 6 _ 6 4
0000160
. . . .
. . . .
. . . .
. . . .
In order to translate the previous table to a meaningful text we can use
the command strings
which will find any strings of printable characters with a length about four characters or longer. For example, in the previous table:
Row <0000040> contain the lettersr e b o
.
Row <0000060> contain the letterso t
.
As a results, the commandstrings
would translate these letters into the word"reboot".
Similarly,
Row <0000100> contain3 . 1 0
.
Row <0000120> contain. 0 - 6 9 3 . 1 1 . 1 . e l 7 .
.
Row <0000140> containx 8 6 _ 6 4
.
The command string
would translate these three rows into "3.10.0-693.11.1.el7.x86_64"
$ strings /var/run/utmp
reboot
3.10.0-693.11.1.el7.x86_64
. . . .
. . . .
. . . .
. . . .
edited Sep 3 at 18:12
slm♦
237k65486659
237k65486659
answered Sep 1 at 14:57
TNT
309111
309111
1
This is exactly what I wanted thank you so much!! ;-)
– Kasper
Sep 1 at 21:31
add a comment |Â
1
This is exactly what I wanted thank you so much!! ;-)
– Kasper
Sep 1 at 21:31
1
1
This is exactly what I wanted thank you so much!! ;-)
– Kasper
Sep 1 at 21:31
This is exactly what I wanted thank you so much!! ;-)
– Kasper
Sep 1 at 21:31
add a comment |Â
up vote
3
down vote
od -c /var/run/utmp
tries its best to output a meaningful text, printing the file char by char, in clear text where it can, and in a sort of binary / octal representation when it can't. You can influence od
's behaviour by setting several options. utmp
is a binary file with fixed records, and thus chances are low to actually read its contents without translation / interpretation / formatting.
1
Thanks! the command "who" reads the utmp file and output log onto information? How the command "who" interpret the coded utmp file?
– Kasper
Sep 1 at 15:07
1
It knows and interprets the structures and details.man utmp
:The file is a sequence of utmp structures, declared as follows in <utmp.h> . . .
– RudiC
Sep 1 at 15:14
add a comment |Â
up vote
3
down vote
od -c /var/run/utmp
tries its best to output a meaningful text, printing the file char by char, in clear text where it can, and in a sort of binary / octal representation when it can't. You can influence od
's behaviour by setting several options. utmp
is a binary file with fixed records, and thus chances are low to actually read its contents without translation / interpretation / formatting.
1
Thanks! the command "who" reads the utmp file and output log onto information? How the command "who" interpret the coded utmp file?
– Kasper
Sep 1 at 15:07
1
It knows and interprets the structures and details.man utmp
:The file is a sequence of utmp structures, declared as follows in <utmp.h> . . .
– RudiC
Sep 1 at 15:14
add a comment |Â
up vote
3
down vote
up vote
3
down vote
od -c /var/run/utmp
tries its best to output a meaningful text, printing the file char by char, in clear text where it can, and in a sort of binary / octal representation when it can't. You can influence od
's behaviour by setting several options. utmp
is a binary file with fixed records, and thus chances are low to actually read its contents without translation / interpretation / formatting.
od -c /var/run/utmp
tries its best to output a meaningful text, printing the file char by char, in clear text where it can, and in a sort of binary / octal representation when it can't. You can influence od
's behaviour by setting several options. utmp
is a binary file with fixed records, and thus chances are low to actually read its contents without translation / interpretation / formatting.
answered Sep 1 at 15:05
RudiC
1,1616
1,1616
1
Thanks! the command "who" reads the utmp file and output log onto information? How the command "who" interpret the coded utmp file?
– Kasper
Sep 1 at 15:07
1
It knows and interprets the structures and details.man utmp
:The file is a sequence of utmp structures, declared as follows in <utmp.h> . . .
– RudiC
Sep 1 at 15:14
add a comment |Â
1
Thanks! the command "who" reads the utmp file and output log onto information? How the command "who" interpret the coded utmp file?
– Kasper
Sep 1 at 15:07
1
It knows and interprets the structures and details.man utmp
:The file is a sequence of utmp structures, declared as follows in <utmp.h> . . .
– RudiC
Sep 1 at 15:14
1
1
Thanks! the command "who" reads the utmp file and output log onto information? How the command "who" interpret the coded utmp file?
– Kasper
Sep 1 at 15:07
Thanks! the command "who" reads the utmp file and output log onto information? How the command "who" interpret the coded utmp file?
– Kasper
Sep 1 at 15:07
1
1
It knows and interprets the structures and details.
man utmp
: The file is a sequence of utmp structures, declared as follows in <utmp.h> . . .
– RudiC
Sep 1 at 15:14
It knows and interprets the structures and details.
man utmp
: The file is a sequence of utmp structures, declared as follows in <utmp.h> . . .
– RudiC
Sep 1 at 15:14
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f466257%2fexplanation-for-the-meaning-of-content-of-the-var-run-utmp-file%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
3
man od would tell you the proper answer: the characters are by default in ASCII.
– Thomas Dickey
Sep 1 at 14:49
2
Have you read
man od
?– mattia.b89
Sep 1 at 14:50
2
Yes, but it is still not clear. For instance, what is the meaning of the letters r, e, b, l, t. What is the meaning of the numbers 0,1,9, … etc. What is the meaning of the characters?
– Kasper
Sep 1 at 14:53
1
Those are literally the ASCII characters stored in the file. Not all of the bytes are printable characters. For the format, do man utmp.
– Thomas Dickey
Sep 1 at 14:57