The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
63 views

Commands for data manipulation of binary to octave/hex formats?

I need to convert binary data to hex/octave/any suitable format and back to binary when I am splitting one big 1GB file into files containing 777 events each which are not of the same size such that ...
0
votes
1answer
33 views

What is the meaning of Star symbol * in Hex data?

I see sometimes star symbol (*) in the hex editor, like ... 00001d0 0000 0000 0000 0000 0000 0000 0000 0000 * 00001f0 0000 0000 0000 0000 0008 0000 0000 0000 ... It is probably some sort of ...
14
votes
4answers
1k views

Is there an alternative to sed that supports unicode?

For example: sed 's/\u0091//g' file1 Right now, I have to do hexdump to get hex number and put into sed as follows: $ echo -ne '\u9991' | hexdump -C 00000000 e9 a6 91 ...
2
votes
2answers
65 views

Hexdump of a string starting at new lines?

Say I have a multi-line strings, but the entries on it are short; if I try to hexdump, then I get something like this: echo "something is being written here" | hexdump -C #00000000 73 6f 6d 65 74 ...
0
votes
1answer
144 views

Convert serialized Java object to human readable

I have object of class class X { private DateTime dt; "constructor, set/get" } I have one instance of this object serialized in file.bin. I want to show content of `file.bin on the Linux ...
19
votes
4answers
2k views

How to dump a binary file as a C/C++ string literal?

I have a binary file I would like to include in my C source code (temporarily, for testing purposes) so I would like to obtain the file contents as a C string, something like this: \x01\x02\x03\x04 ...
1
vote
1answer
61 views

Hexdump binary file while honoring separators

I have a binary file where records are separated by newlines. hexdump just dumps everything with a fixed column width. Is there a tool to hexdump this file, while honoring the newline separator? (Any ...
1
vote
1answer
94 views

hexedit: change number of columns (bytes per line)

I am using hexedit to show/edit disk MBR (512 Bytes, copied with dd). When I open the file, hexedit displays the file as 9 columns, 4 bytes per column (36 bytes per line). That is very unfortunate. I ...
3
votes
1answer
558 views

Why do I get different output from hexdump compared to xxd?

Why does hexdump seem to miss out parts of the file, while xxd does not? The file is 32 bytes. So xxd output is correct. $ xxd test.bin 0000000: 8888 8888 8888 8888 8888 8888 8888 8888 ...
5
votes
3answers
411 views

Achieving hexdump-like format, that includes binary strings, on the command line?

I really like hexdump, especially because you can define a custom format; say: $ echo -e '\x00\x01\x02\x03' | hexdump -v -e '1/1 "%_ad: "' -e '4/1 "%02X "' -e '1/1 " : "' -e '4/1 "%_p"' -e '1/1 "\n"' ...
3
votes
3answers
537 views

Why do ls and hexdump disagree about my file size?

I have a file I created (in vim), for testing purposes (testing UTF-8 output in an SSH client). Odd things, however, are happening to this file. I wondered what bytes were in the file, so I used ...
2
votes
3answers
184 views

Why can't I edit links and directories directly?

There are programs such as hexedit that allow one to edit each bit of a file, and as I keep hearing that in Unix "everything is a file", I tried to edit some directory, expecting bytes referring to ...
3
votes
1answer
188 views

What does `*` mean using hexdump -C?

I've been doing an exersice in attempt to understanding some of what's going on under the hood of a program. I wrote a small C program, and compiled it on i386 Linux (Ubuntu 12.04) using gcc. I then ...
0
votes
1answer
258 views

stream a certificate to stdout to download it in php

Related Questions : when downloading certficate binary data , result is invalid certificate Download binary stream data from browser using PHP with web service “ downloaded file is corrupted ” ...
5
votes
2answers
3k views

Does hexdump respect the endianness of its system?

On my machine I get the following output when I run these commands: $ echo foos > myfile $ hexdump myfile 6f66 736f 000a The output from hexdump is little-endian. Does this mean that my machine ...
3
votes
2answers
9k views

How to interpret an octal or hex dump of a binary file?

The binary file has strings and some numbers, If I do od -c filename or strings filename, I can see the strings properly. But, what about numbers? They are in some weird format. The text after doing ...