TLDR ; Thinkpad BIOS debug log is not in text . Just converted it to text using xclip , instead of using strings, hexdump , xxd tools .

Steps done:

$ file bios-debug-log.data
bios-debug-log.data: data
$ cat bios-debug-log.data | xclip 
$ xclip -o # Pastes as text to Terminal . Copy the text from there.
##xclip -o > test-file # Pastes the same data to file. Cannot use this

I have ran diagnostic logs for lenovo support , which was saved as data file. ( Found tools like strings, hexdump , xxd from online search which can read the data. ) But while playing with the file, I noticed xclip can copy and paste the data to Terminal app as text! Then, copy the text from Terminal app .

Qn. I guess the data file was encoded to a binary format. And xclip decoded the text content. Is this correct ?

Thanks,

  • thingsiplay@beehaw.org
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    43 minutes ago

    xclip has works on the universal system clipboard and on the selection board. The selection board is the secondary clipboard basically and unique to Linux (as compared to Windows). In example if you go to your browser and select some text, then this part is stored in your “Linux selection board” that is independent from clipboard. So its important to have this distinction. xclip defaults to selection board, unless told otherwise with xclip -selection clipboard.

    EDIT: I replaced the second paragraph here, because just found out you can specify the format of the data I think. I never explicitly done that, so not sure if this is the actual thing you would need to preserve binary data. xclip -target TARGET can set the format and those are listed at https://tronche.com/gui/x/icccm/sec-2.html#s-2.6.1 under Target Atoms. So I leave this question open as an exercise to the reader.