Questions tagged [byte]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
25
votes
3answers
1k views

Byte count of “ls -l <random file>” versus that of “wc -c <random file>”

Is there any possible situation when ls -l file.txt is showing not the same number of bytes as wc -c file.txt In one script I found comparison of those two values. What could be the reason of ...
13
votes
4answers
18k views

Is there a oneliner that converts a binary file from little endian to big endian?

and vice versa. I am running a RedHat if relevant.
6
votes
3answers
4k views

How do I trim bytes from the beginning and end of a file?

I have a file, that has trash (binary header and footer) at the beginning and end of the file. I would like to know how to nuke these bytes. For an example, let's assume 25 bytes from the beginning. ...
5
votes
4answers
355 views

How to count the number of bytes in a file, grouping the same bytes?

Example: I have the file "mybinaryfile", and the contents in hex are: A0 01 00 FF 77 01 77 01 A0 I need to know how many A0 bytes there are in this file, how many 01, and so on. The result could be: ...
3
votes
2answers
496 views

How to bury an invisible mark into lines of text?

How can I bury an invisible mark into random lines of text? Such a mark has to be there, though it will be invisible to someone reading that text printed out on the console. I want to identify those ...
0
votes
2answers
11k views

What options does wget --report-speed take?

When I do this command: wget --report-speed=type they only type it accepts is bits. It won't have numbers, kilobits / kilobytes or bytes. The help page (wget --help) says: --report-speed=TYPE ...
0
votes
1answer
202 views

Why is od calculating decimal values wrong?

This question is related to the answer from enzotib to the question: How could I use Bash to find 2 bytes in a binary file, increase their values, and replace? This converts the two bytes into its ...
0
votes
1answer
37 views

Entropy: whats the difference between bits and bytes?

If I use openssl to generate some random data (for a keyfile, for example): openssl rand -hex 2048 >/tmp/file Is this 4097 bits (or bytes?) of entropy? -rw-rw-r-- 1 username username 4097 Oct 30 ...
-3
votes
1answer
297 views

How large is the Linux kernel compared to Unix? [closed]

Not in just LOC (lines of code), but in storage size, as in bytes, megabytes, gigabytes, etc. Also, any sources where I can download the original-based Unix OS? Thanks!