Score:0

Console File Viewer which shows byte position numbers

us flag

I have a large data-file with record length 800 bytes. It is to big to open it in gui-texteditors, but less and grep is working fine.

But I need to see fast which number is in the records on position 61 and 451 and so on. Is there a file-viewer or maybe function in less to display the byte numeration within a record?

on mainframe we have something like that:

0000000006....6000000001  *000000107024                WDB            N   0 SERV
FFFFFFFFFF0003FFFFFFFFFF445FFFFFFFFFFFF4444444444444444ECC444444444444D444F4ECDE
0000000006000C600000000100C00000010702400000000000000006420000000000005000002595
 ...+...10....+...20....+...30....+...40....+...50....+...60....+...70....+.... 
ICEWÄSCHE 1                                     450SLC                          
CCCE4ECCC4F4444444444444444444444444444444444444FFFEDC44444444444444444444444444
9356A238501000000000000000000000000000000000000045023300000000000000000000000000
 ...+...90....+..100....+..110....+..120....+..130....+..140....+..150....+.... 
    000001000E107024                                                            
4444FFFFFFFFFCFFFFFF444444444444444444444444444444444444444444444444444444444444
00000000010005107024000000000000000000000000000000000000000000000000000000000000
 ...+..170....+..180....+..190....+..200....+..210....+..220....+..230....+.... 
  WDB107024.....................................................................
44ECCFFFFFF000000000000000000000000000000000000000000000000000000000000000000000
00642107024000000000000000000000000000000000000000000000000000000000000000000000
 ...+..250....+..260....+..270....+..280....+..290....+..300....+..310....+.... 

Is there something like that in Linux?

hr flag
I'm not sure what your "mainframe" example is supposed to show - can you add a small, testable example of the real input and desired output?
terdon avatar
cn flag
And are you sure GUI editors can't open it? I often use emacs on files that are several gigabytes in size. Finally, are you just looking for something like `head -c 143 | tail -c1` to see what character is at the 143th byte of the file?
Andi S. avatar
us flag
This example is showing a line of a data file. first row is the character-line, second and third line is the hex-value of this byte and line four is the byte position number to see on which position this byte is located within the record. at the moment i am working with head and tail like terdon said. but nicer would be to have such a tool to display one line of file.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.