Почему этот странный символ появляется в каждой строке в моем журнале загрузки Linux?

597
hans109h
[154G 

Каждая строка моего файла boot.log в Ubuntu имеет escape-символ, который состоит из двух нулей в верхней строке и 1b в нижней строке, окруженных рамкой из одной строки, затем текстом, а 154Gзатем ожидаемым [ ok ]или [ failed ].

Почему в каждой строке написан символ в штучной упаковке и что это значит?

Boot.log Снимок экрана:

Скриншот

2
Этот вопрос не является не по теме, поэтому, пожалуйста, не голосуйте, чтобы закрыть его как таковой. Я думаю, что этот вопрос немного неясен, хотя. Изображение было бы очень полезно здесь. bwDraco 9 лет назад 0

1 ответ на вопрос

2
Hannu

You are peeking into data that should be sent to a device that understands ANSI sequences.

1B is the HEX code for "ESC", (escape, character 27 in the ASCII table. The Unicode equivalent is u001B, which might be why it is displayed in that manner.
[ is part of the introduction of ANSI sequences, when paired with ESC.
154 is a parameter, and G tells the function to run with that parameter.

Type od -t x1z boot.log | less to see the contents in hex and text formats, side by side.

Assuming that your terminal understands the sequence:
head -n 30 boot.log should display the text formatted in the manner it was intended to be seen.

Похожие вопросы